Created
July 4, 2014 14:12
-
-
Save vivahiraj/f4c7c56d2b81e3489ce2 to your computer and use it in GitHub Desktop.
sshを利用できるようにするDockerfileサンプル
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 centos:latest | |
MAINTAINER vivahiraj | |
ENV ADD_USER tomato | |
ENV USER_PWD tomato | |
RUN yum update -y | |
RUN yum -y install openssh-server | |
RUN sed -ri 's/required pam_loginuid.so/optional pam_loginuid.so/g' /etc/pam.d/sshd | |
RUN /etc/init.d/sshd start | |
RUN /etc/init.d/sshd stop | |
RUN useradd -m $ADD_USER | |
RUN echo $ADD_USER:$USER_PWD | chpasswd | |
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