Allow Remote port binding
Signed-off-by: Martyn Ranyard <m@rtyn.berlin>
This commit is contained in:
		
							parent
							
								
									9af04b6208
								
							
						
					
					
						commit
						eef606b770
					
				
					 1 changed files with 5 additions and 2 deletions
				
			
		| 
						 | 
					@ -1,7 +1,10 @@
 | 
				
			||||||
FROM library/alpine
 | 
					FROM library/alpine
 | 
				
			||||||
RUN apk add --no-cache openssh && \
 | 
					RUN apk add --no-cache openssh && \
 | 
				
			||||||
  sed -i /etc/ssh/sshd_config -e s/'#Port.*'/'Port 2222'/ -e s/'AllowTcpForwarding.*'/'AllowTcpForwarding yes'/ && \
 | 
					  sed -i /etc/ssh/sshd_config \
 | 
				
			||||||
  ssh-keygen -A
 | 
					  -e s/'#Port.*'/'Port 2222'/ \
 | 
				
			||||||
 | 
					  -e s/'AllowTcpForwarding.*'/'AllowTcpForwarding yes'/ \
 | 
				
			||||||
 | 
					  -e s/'GatewayPorts.*'/'GatewayPorts clientspecified'/ \
 | 
				
			||||||
 | 
					  && ssh-keygen -A
 | 
				
			||||||
RUN adduser -D -s /bin/ash beagle
 | 
					RUN adduser -D -s /bin/ash beagle
 | 
				
			||||||
ADD beagle.key /home/beagle/.ssh/authorized_keys
 | 
					ADD beagle.key /home/beagle/.ssh/authorized_keys
 | 
				
			||||||
RUN passwd -u beagle && \
 | 
					RUN passwd -u beagle && \
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue