From 8a8256b35cee8c76f11236fd96360c7969bb1945 Mon Sep 17 00:00:00 2001 From: Newnius Date: Wed, 17 Apr 2019 13:13:13 +0800 Subject: [PATCH] update dev-base --- dev-base/Dockerfile | 7 ++++++- dev-base/bootstrap.sh | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 dev-base/bootstrap.sh diff --git a/dev-base/Dockerfile b/dev-base/Dockerfile index 5269f93..450bd51 100644 --- a/dev-base/Dockerfile +++ b/dev-base/Dockerfile @@ -5,8 +5,13 @@ MAINTAINER Newnius RUN yes | unminimize && \ apt update && \ apt install -y curl openssh-server vim openjdk-8-jre python3-pip git bash-completion && \ - pip3 install numpy scipy pandas scikit-learn matplotlib + pip3 install numpy scipy pandas scikit-learn matplotlib sklearn && \ + rm -rf /var/lib/apt/lists/* RUN echo "PermitRootLogin yes" >> /etc/ssh/sshd_config WORKDIR /root + +ADD bootstrap.sh /etc/bootstrap.sh + +CMD ["/etc/bootstrap.sh"] diff --git a/dev-base/bootstrap.sh b/dev-base/bootstrap.sh new file mode 100644 index 0000000..796080b --- /dev/null +++ b/dev-base/bootstrap.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +# reset root password + +if [[ -z "${SSH_PASS}" ]]; then + export SSH_PASS=password +fi + +echo "${SSH_PASS}" | passwd --stdin + +# start sshd service +/etc/init.d/ssh start + +# do nothing but wait +sleep infinity