Skip to content

Commit

Permalink
Update SSH demo to ubuntu 14.04
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Keromnes <janx@linux.com>
  • Loading branch information
jankeromnes committed Sep 4, 2014
1 parent bc26aa7 commit 98f57d1
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions docs/sources/examples/running_ssh_service.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ quick access to a test container.
#
# VERSION 0.0.1

FROM ubuntu:12.04
FROM ubuntu:14.04
MAINTAINER Thatcher R. Peskens "thatcher@dotcloud.com"

RUN apt-get update && apt-get install -y openssh-server
RUN mkdir /var/run/sshd
RUN echo 'root:screencast' |chpasswd
RUN echo 'root:screencast' | chpasswd
RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config

EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]
CMD ["/usr/sbin/sshd", "-D"]

Build the image using:

Expand All @@ -33,8 +34,9 @@ the container's port 22 is mapped to:
$ sudo docker port test_sshd 22
0.0.0.0:49154

And now you can ssh to port `49154` on the Docker daemon's host IP
address (`ip address` or `ifconfig` can tell you that):
And now you can ssh as `root` on the container's IP address (you can find it
with `docker inspect`) or on port `49154` of the Docker daemon's host IP address
(`ip address` or `ifconfig` can tell you that):

$ ssh root@192.168.1.2 -p 49154
# The password is ``screencast``.
Expand Down

0 comments on commit 98f57d1

Please sign in to comment.