Docker commiting custom container changes to docker repo

When you login inside docker container and modify it you might want to save the changes
Do the following:

docker ps
CONTAINER ID        IMAGE                                     COMMAND                  CREATED             STATUS              PORTS                                      NAMES
3c467f494520        c9de8ac964a9                              "/bin/bash"              31 minutes ago      Up 31 minutes       0.0.0.0:81->80/tcp, 0.0.0.0:444->443/tcp   mycontainer

Get container name and commit the changes

docker commit 3c467f494520 myusername/mydockerimage:latest

Push it to remote docker repo

docker push myusername/mydockerimage:latest

Leave a Reply