Created
          February 21, 2014 14:27 
        
      - 
      
- 
        Save thestonefox/9135218 to your computer and use it in GitHub Desktop. 
    SSH Access For Docker
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #Setup SSH Access | |
| RUN apt-get -q -y update | |
| RUN apt-get install -q -y openssl whois openssh-server vim nano | |
| RUN mkdir -p /root/.ssh | |
| RUN chown -R root:root /root/.ssh | |
| RUN chmod -R 600 /root/.ssh/ | |
| RUN mkdir -p /var/run/sshd | |
| RUN printf "#!/bin/bash \ | |
| \n echo \"root:password\" |chpasswd \ | |
| \n /usr/sbin/sshd -D" > /usr/local/bin/run | |
| RUN chmod +x /usr/local/bin/run | |
| CMD ["/usr/local/bin/run"] | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment