4

I have lucid:latest image with Ubuntu 10.04. After run this image I'm trying to change host name:

docker run -t -i lucid:latest /bin/bash

After changing hostname in another console window I'm typing commands:

$ sudo docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
fdab6a995726        lucid:latest       "/bin/bash"         4 seconds ago       Up 3 seconds                            furious_stallman 
$ sudo docker commit fdab6a995726

After that my changes that I make to this image should be saved but is not. If I logout from container and back again changes are not commited. What's wrong?

QkiZ
  • 384

1 Answers1

1

you should try docker commit fdab6a995726 IMAGENAME with IMAGENAME the name you want to give your image (free to choose). also there is usually no need to write sudo docker, just docker commit ID IMAGENAME or docker commit CONTAINERNAME IMAGENAME (containername can be set when using "--name CONTAINERNAME" in run-command (for example docker run -t -i --name test lucid:latest /bin/bash)