ssh keys
This commit is contained in:
		@@ -55,6 +55,28 @@ RUN if [ ${INSTALL_XDEBUG} = true ]; then \
 | 
			
		||||
# ADD for REMOTE debugging
 | 
			
		||||
COPY ./xdebug_settings_only.ini /etc/php/7.0/cli/conf.d/xdebug_settings_only.ini
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#####################################
 | 
			
		||||
# ssh:
 | 
			
		||||
#####################################
 | 
			
		||||
 | 
			
		||||
# Check if ssh needs to be installed
 | 
			
		||||
# See: https://github.com/phusion/baseimage-docker#enabling_ssh
 | 
			
		||||
ADD insecure_id_rsa /tmp/id_rsa
 | 
			
		||||
ADD insecure_id_rsa.pub /tmp/id_rsa.pub
 | 
			
		||||
ARG INSTALL_WORKSPACE_SSH=true
 | 
			
		||||
ENV INSTALL_WORKSPACE_SSH ${INSTALL_SSH}
 | 
			
		||||
RUN 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 \
 | 
			
		||||
;fi
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#####################################
 | 
			
		||||
# MongoDB:
 | 
			
		||||
#####################################
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user