Last active
August 14, 2017 17:33
-
-
Save skahack/6277480 to your computer and use it in GitHub Desktop.
This file contains 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
FROM ubuntu:12.04 | |
MAINTAINER SKAhack | |
run echo "deb http://archive.ubuntu.com/ubuntu quantal main universe" > /etc/apt/sources.list | |
RUN apt-get update | |
RUN apt-get install -y software-properties-common | |
RUN apt-get install -y openssh-server | |
RUN apt-get install -y sudo | |
RUN mkdir -p /home/docker | |
RUN useradd docker | |
RUN echo "docker:docker" | chpasswd | |
RUN mkdir -p /home/docker/.ssh; chown docker /home/docker/.ssh; chmod 700 /home/docker/.ssh | |
ADD ./authorized_keys /home/docker/.ssh/ | |
ADD ./authorized_keys /root/.ssh/ | |
RUN echo "docker ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers | |
RUN mkdir /var/run/sshd | |
RUN /usr/sbin/sshd | |
EXPOSE 22 | |
CMD ["/usr/sbin/sshd", "-D"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment