Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Signed-off-by: Oskars Germovs <[email protected]>
  • Loading branch information
Faks committed Mar 23, 2024
1 parent 6eba021 commit 458919d
Showing 1 changed file with 30 additions and 25 deletions.
55 changes: 30 additions & 25 deletions workspace/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -436,31 +436,36 @@ RUN if [ ${INSTALL_XDEBUG} = false -a ${INSTALL_BLACKFIRE} = true ]; then \

ARG INSTALL_WORKSPACE_SSH=false

RUN mkdir -p /tmp/secure_ssh_keys && \
chmod 7777 /tmp/secure_ssh_keys \
&& cp -rf /tmp/secure_ssh_keys/* /root/.ssh/ \
&& mkdir -p /tmp/insecure_ssh_keys && \
chmod 7777 /tmp/insecure_ssh_keys \
&& cp -rf /tmp/insecure_ssh_keys/* /root/.ssh/ \
&& chmod 644 /root/.ssh/id_rsa.pub /root/.ssh/id_rsa.pub \
&& chmod 400 /root/.ssh/id_rsa /root/.ssh/id_rsa \
&& cp -rf /root/.ssh /home/laradock \
&& chown -R laradock:laradock /home/laradock/.ssh \
&& cp /usr/local/bin/install_ssh_keys.sh /tmp/ \
&& chmod +x /tmp/install_ssh_keys.sh \
&& /tmp/install_ssh_keys.sh \
&& rm -rf /tmp/secure_ssh_keys /tmp/insecure_ssh_keys /tmp/install_ssh_keys.sh \
&& if [ ${INSTALL_WORKSPACE_SSH} = true ]; then \
rm -f /etc/service/sshd/down && \
cat /tmp/id_rsa.pub >> /root/.ssh/authorized_keys \
&& cat /tmp/id_rsa.pub >> /root/.ssh/id_rsa.pub \
&& cat /tmp/id_rsa >> /root/.ssh/id_rsa \
&& rm -f /tmp/id_rsa* \
&& chmod 644 /root/.ssh/authorized_keys /root/.ssh/id_rsa.pub \
&& chmod 400 /root/.ssh/id_rsa \
&& cp -rf /root/.ssh /home/laradock \
&& chown -R laradock:laradock /home/laradock/.ssh \
;fi
RUN \
mkdir -p /tmp/secure_ssh_keys && \
chmod 7777 /tmp/secure_ssh_keys && \
COPY secure_ssh_keys/id_rsa /tmp/secure_ssh_keys/id_rsa && \
COPY secure_ssh_keys/id_rsa.pub /tmp/secure_ssh_keys/id_rsa.pub && \
\
mkdir -p /tmp/insecure_ssh_keys && \
chmod 7777 /tmp/insecure_ssh_keys && \
COPY insecure_id_rsa /tmp/insecure_ssh_keys/id_rsa && \
COPY insecure_id_rsa.pub /tmp/insecure_ssh_keys/id_rsa.pub && \
\
COPY install_ssh_keys.sh /usr/local/bin/install_ssh_keys.sh && \
chmod +x /usr/local/bin/install_ssh_keys.sh && \
\
/usr/local/bin/install_ssh_keys.sh && \
\
rm -rf /tmp/secure_ssh_keys && \
rm -rf /tmp/insecure_ssh_keys && \
\
if [ ${INSTALL_WORKSPACE_SSH} = true ]; then \
rm -f /etc/service/sshd/down && \
cat /tmp/id_rsa.pub >> /root/.ssh/authorized_keys && \
cat /tmp/id_rsa.pub >> /root/.ssh/id_rsa.pub && \
cat /tmp/id_rsa >> /root/.ssh/id_rsa && \
rm -f /tmp/id_rsa* && \
chmod 644 /root/.ssh/authorized_keys /root/.ssh/id_rsa.pub && \
chmod 400 /root/.ssh/id_rsa && \
cp -rf /root/.ssh /home/laradock && \
chown -R laradock:laradock /home/laradock/.ssh \
;fi

###########################################################################
# MongoDB:
Expand Down

0 comments on commit 458919d

Please sign in to comment.