docker : commit doesn't seem to persist changes by the passwd command

docker run -i -t dhrp/sshd /bin/bash


...change the pw

In another shell : 

docker commit f123d1d12d max/sshd


max@max-ubuntu:~$ docker images

max/sshd            latest         fbf0b19e284f    13 seconds ago  21.12 kB 

Then I start the container : 

docker  run -d -p 22 max/sshd /usr/sbin/sshd -D
docker ps 

ID                  IMAGE               COMMAND             CREATED             STATUS              PORTS
440871de534f        dhrp/sshd:latest    /bin/bash           34 seconds ago      Up 34 seconds               

then I try to login : 

root@localhost 49164

using the password "commited" earlyer, and it fails (invalid passwd or username)....

To make sure the commit is done properly I did  : 

echo 123 > test 

inside the container before the commit 

and then run 

>docker  run  max/sshd cat test

so the commit is doing something, just not persisting the passwd command...

Versions : 

max@max-ubuntu:~$ docker version
Client version: 0.5.0
Server version: 0.5.0
Go version: go1.1

and dhrp/sshd is whatever happens to be in the docker index....

  • Docker and rancher
  • Does AWS ECS support per container dynamic scalability?
  • Nightwatch keeps giving 502 bad gateway
  • How to set the container name used for --link option with Docker
  • Docker-compose link containers in settings file
  • Is it possible for a the host to authenticate to a KDC running on a Docker container?
  • One Solution collect form web for “docker : commit doesn't seem to persist changes by the passwd command”

    Ok, here’s what the problem was :

    Not invoking the ssh client properly :

    root@localhost 49164

    should have been :

    root@localhost -p 49164

    I’ll close the question because it will just add noise….

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.