|
|
@ -153,15 +153,20 @@ if [ -d "$Wdir/project" ]; then |
|
|
|
COPY ssh/ \${SSHDIR}/ |
|
|
|
|
|
|
|
RUN export DEBIAN_FRONTEND=noninteractive \ |
|
|
|
&& useradd -ms /bin/bash docker \ |
|
|
|
&& rm -rf /usr/share/doc \ |
|
|
|
&& rm -rf /usr/share/man \ |
|
|
|
&& rm -rf /usr/share/locale \ |
|
|
|
&& mkdir -p /var/run/sshd \ |
|
|
|
&& echo 'root:$ROOT_PASSWORD' | chpasswd \ |
|
|
|
&& echo 'root:pass' | chpasswd \ |
|
|
|
&& echo "export VISIBLE=now" >> /etc/profile \ |
|
|
|
&& mkdir -p /home/docker/project \ |
|
|
|
&& mkdir -p /etc/opt \ |
|
|
|
&& echo "docker:docker" | chpasswd \ |
|
|
|
&& echo "StrictHostKeyChecking no" > \${SSHDIR}/config \ |
|
|
|
&& cat \${SSHDIR}/*.pub >> \${SSHDIR}/authorized_keys \ |
|
|
|
&& chmod -R 600 \${SSHDIR}/* \ |
|
|
|
&& chown -R \${USER1}:\${USER1} \${SSHDIR} |
|
|
|
|
|
|
|
COPY .vimrc /home/docker |
|
|
|
USER root |
|
|
@ -230,12 +235,17 @@ if [ "$Wdir" == "$HOME" ]; then |
|
|
|
&& rm -rf /usr/share/doc \ |
|
|
|
&& rm -rf /usr/share/man \ |
|
|
|
&& rm -rf /usr/share/locale \ |
|
|
|
&& useradd -ms /bin/bash docker \ |
|
|
|
&& mkdir -p /var/run/sshd \ |
|
|
|
&& echo 'root:$ROOT_PASSWORD' | chpasswd \ |
|
|
|
&& echo 'root:pass' | chpasswd \ |
|
|
|
&& echo "export VISIBLE=now" >> /etc/profile \ |
|
|
|
&& mkdir -p /home/docker/project \ |
|
|
|
&& mkdir -p /etc/opt \ |
|
|
|
&& echo "docker:docker" | chpasswd \ |
|
|
|
&& echo "StrictHostKeyChecking no" > \${SSHDIR}/config \ |
|
|
|
&& cat \${SSHDIR}/*.pub >> \${SSHDIR}/authorized_keys \ |
|
|
|
&& chmod -R 600 \${SSHDIR}/* \ |
|
|
|
&& chown -R \${USER1}:\${USER1} \${SSHDIR} |
|
|
|
|
|
|
|
COPY .vimrc /home/docker |
|
|
|
USER root |
|
|
|