docker pull saiakhil2012/nginx
docker image inspect saiakhil2012/nginx
docker pull saiakhil2012/nginx:with_vim
docker image inspect saiakhil2012/nginx:with_vim
docker run -d --name enhanced_nginx saiakhil2012/enhanced_nginx
docker exec -it enhanced_nginx /bin/bash
cd /home/
vim myfile.txt
Hello World
:wq
exit
docker commit -m "Added myfile.txt" <container_id> saiakhil2012/nginx:with_vim_myfile
docker images
docker run -d --name nginx_with_vim_myfile saiakhil2012/nginx:with_vim_myfile
docker exec -it enhanced_nginx /bin/bash
cd /home/
vim myfile.txt
:q
exit
docker image inspect saiakhil2012/nginx:with_vim_myfile
docker image inspect saiakhil2012/nginx:with_vim
docker image history saiakhil2012/nginx:with_vim
docker image history saiakhil2012/nginx:with_vim_myfile
Observe the comment which we added before