Browse code

Update SSH demo to ubuntu 14.04

Signed-off-by: Jan Keromnes <janx@linux.com>

Jan Keromnes authored on 2014/09/04 06:44:57
Showing 1 changed files
... ...
@@ -12,15 +12,16 @@ quick access to a test container.
12 12
     #
13 13
     # VERSION               0.0.1
14 14
 
15
-    FROM     ubuntu:12.04
15
+    FROM     ubuntu:14.04
16 16
     MAINTAINER Thatcher R. Peskens "thatcher@dotcloud.com"
17 17
 
18 18
     RUN apt-get update && apt-get install -y openssh-server
19 19
     RUN mkdir /var/run/sshd
20
-    RUN echo 'root:screencast' |chpasswd
20
+    RUN echo 'root:screencast' | chpasswd
21
+    RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config
21 22
 
22 23
     EXPOSE 22
23
-    CMD    ["/usr/sbin/sshd", "-D"]
24
+    CMD ["/usr/sbin/sshd", "-D"]
24 25
 
25 26
 Build the image using:
26 27
 
... ...
@@ -33,8 +34,9 @@ the container's port 22 is mapped to:
33 33
     $ sudo docker port test_sshd 22
34 34
     0.0.0.0:49154
35 35
 
36
-And now you can ssh to port `49154` on the Docker daemon's host IP
37
-address (`ip address` or `ifconfig` can tell you that):
36
+And now you can ssh as `root` on the container's IP address (you can find it
37
+with `docker inspect`) or on port `49154` of the Docker daemon's host IP address
38
+(`ip address` or `ifconfig` can tell you that):
38 39
 
39 40
     $ ssh root@192.168.1.2 -p 49154
40 41
     # The password is ``screencast``.