Browse Source

add on

master
zeus 4 years ago
parent
commit
9c80e59c24
  1. 24
      install/usr/share/swarmlab.io/sec/swarmlab-sec

24
install/usr/share/swarmlab.io/sec/swarmlab-sec

@ -136,7 +136,7 @@ if [ -d "$Wdir/project" ]; then
&& mkdir -p /var/run/sshd \
&& echo 'root:$ROOT_PASSWORD' | chpasswd \
&& echo "export VISIBLE=now" >> /etc/profile \
&& mkdir -p /project \
&& mkdir -p /home/docker/project \
&& mkdir -p /etc/opt \
&& echo "docker:docker" | chpasswd \
&& echo "StrictHostKeyChecking no" > \${SSHDIR}/config \
@ -144,7 +144,7 @@ if [ -d "$Wdir/project" ]; then
&& chmod -R 600 \${SSHDIR}/* \
&& chown -R \${USER1}:\${USER1} \${SSHDIR}
WORKDIR /project
WORKDIR /home/docker/project
COPY .vimrc /home/docker
USER docker
EOF
@ -169,14 +169,14 @@ EOF
&& echo 'root:$ROOT_PASSWORD' | chpasswd \
&& echo "export VISIBLE=now" >> /etc/profile \
&& mkdir -p /etc/opt \
&& mkdir -p /project \
&& mkdir -p /home/docker/project \
&& echo "docker:docker" | chpasswd \
&& echo "StrictHostKeyChecking no" > \${SSHDIR}/config \
&& cat \${SSHDIR}/*.pub >> \${SSHDIR}/authorized_keys \
&& chmod -R 600 \${SSHDIR}/* \
&& chown -R \${USER1}:\${USER1} \${SSHDIR}
WORKDIR /project
WORKDIR /home/docker/project
COPY .vimrc /home/docker
USER docker
EOF
@ -249,7 +249,7 @@ if [ "$Wdir" == "$HOME" ]; then
&& mkdir -p /var/run/sshd \
&& echo 'root:$ROOT_PASSWORD' | chpasswd \
&& echo "export VISIBLE=now" >> /etc/profile \
&& mkdir -p /project \
&& mkdir -p /home/docker/project \
&& mkdir -p /etc/opt \
&& echo "docker:docker" | chpasswd \
&& echo "StrictHostKeyChecking no" > \${SSHDIR}/config \
@ -258,7 +258,7 @@ if [ "$Wdir" == "$HOME" ]; then
&& chown -R \${USER1}:\${USER1} \${SSHDIR}
COPY .vimrc /home/docker
WORKDIR /project
WORKDIR /home/docker/project
USER docker
EOF
else
@ -282,7 +282,7 @@ else
&& echo 'root:$ROOT_PASSWORD' | chpasswd \
&& echo "export VISIBLE=now" >> /etc/profile \
&& mkdir -p /etc/opt \
&& mkdir -p /project \
&& mkdir -p /home/docker/project \
&& echo "docker:docker" | chpasswd \
&& echo "StrictHostKeyChecking no" > \${SSHDIR}/config \
&& cat \${SSHDIR}/*.pub >> \${SSHDIR}/authorized_keys \
@ -290,7 +290,7 @@ else
&& chown -R \${USER1}:\${USER1} \${SSHDIR}
COPY .vimrc /home/docker
WORKDIR /project
WORKDIR /home/docker/project
USER docker
EOF
fi
@ -332,8 +332,8 @@ services:
networks:
- ${HYBRID_NETWORK}
volumes:
- $Wdir/project:/project
- '/tmp/.X11-unix:/tmp/.X11-unix'
- $Wdir/project:/home/docker/project
- /tmp/.X11-unix:/tmp/.X11-unix
worker:
@ -350,8 +350,8 @@ services:
networks:
- ${HYBRID_NETWORK}
volumes:
- $Wdir/project:/project
- '/tmp/.X11-unix:/tmp/.X11-unix'
- $Wdir/project:/home/docker/project
- /tmp/.X11-unix:/tmp/.X11-unix
networks:
${HYBRID_NETWORK}:

Loading…
Cancel
Save