瀏覽代碼

Merge pull request #6219 from cpuguy83/fix_ssh_example_docs_root_login

Fixes broken ssh server example
Sven Dowideit 11 年之前
父節點
當前提交
a2c553bd6b
共有 2 個文件被更改,包括 5 次插入7 次删除
  1. 3 4
      docs/sources/examples/running_ssh_service.Dockerfile
  2. 2 3
      docs/sources/examples/running_ssh_service.md

+ 3 - 4
docs/sources/examples/running_ssh_service.Dockerfile

@@ -2,16 +2,15 @@
 #
 # VERSION               0.0.1
 
-FROM     ubuntu
+FROM     debian
 MAINTAINER Thatcher R. Peskens "thatcher@dotcloud.com"
 
 # make sure the package repository is up to date
-RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
 RUN apt-get update
 
 RUN apt-get install -y openssh-server
-RUN mkdir /var/run/sshd 
+RUN mkdir /var/run/sshd
 RUN echo 'root:screencast' |chpasswd
 
 EXPOSE 22
-CMD    /usr/sbin/sshd -D
+CMD    ["/usr/sbin/sshd", "-D"]

+ 2 - 3
docs/sources/examples/running_ssh_service.md

@@ -12,11 +12,10 @@ quick access to a test container.
     #
     # VERSION               0.0.1
 
-    FROM     ubuntu
+    FROM     debian
     MAINTAINER Thatcher R. Peskens "thatcher@dotcloud.com"
 
     # make sure the package repository is up to date
-    RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list
     RUN apt-get update
 
     RUN apt-get install -y openssh-server
@@ -24,7 +23,7 @@ quick access to a test container.
     RUN echo 'root:screencast' |chpasswd
 
     EXPOSE 22
-    CMD    /usr/sbin/sshd -D
+    CMD    ["/usr/sbin/sshd", "-D"]
 
 Build the image using: