-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*~ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Enabling a ssh demon inside a docker container | ||
# derived from dockerizing and SSH daemon on http://docs.docker.com/examples/running_ssh_service | ||
|
||
|
||
FROM debian:latest | ||
MAINTAINER Yves Nicolas <[email protected]> | ||
|
||
RUN apt-get update && apt-get install -y openssh-server | ||
RUN mkdir /var/run/sshd | ||
RUN echo 'root:screencast' | chpasswd | ||
RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config | ||
|
||
|
||
# SSH login fix. Otherwise user is kicked off after login | ||
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd | ||
|
||
ENV NOTVISIBLE "in users profile" | ||
RUN echo "export VISIBLE=now" >> /etc/profile | ||
|
||
EXPOSE 22 | ||
CMD ["/usr/sbin/sshd", "-D"] |