[root@ip-172-31-34-29 ~]# docker cp index1.html 6ea34f03afd1:/usr/share/nginx/html/
[root@ip-172-31-34-29 ~]# docker container commit 6ea34f03afd1 kishoraswar123/myweb1
sha256:b41c7cab5316358ffb68db98a1b81666a987c75bce5806494da857e30a2a171c
[root@ip-172-31-34-29 ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
kishoraswar123/myweb1 latest b41c7cab5316 4 seconds ago 142MB
my_web latest 86334b49f661 6 minutes ago 142MB
nginx latest 3f8a00f137a0 2 weeks ago 142MB
httpd latest 3a4ea134cf8e 2 weeks ago 145MB
ubuntu latest 58db3edaf2be 4 weeks ago 77.8MB
[root@ip-172-31-34-29 ~]# docker push kishoraswar123/myweb1
Using default tag: latest
The push refers to repository [docker.io/kishoraswar123/myweb1]
92948da76654: Pushed
3ea1bc01cbfe: Mounted from library/nginx
a76121a5b9fd: Mounted from library/nginx
2df186f5be5c: Mounted from library/nginx
21a95e83c568: Mounted from library/nginx
81e05d8cedf6: Mounted from library/nginx
4695cdfb426a: Mounted from library/httpd
latest: digest: sha256:f85a611c28d4bd757ea4b64216323327dd743cf3b01f35b745854493d8dc08b9 size: 1778
[root@ip-172-31-34-29 ~]#
=======================
docker start
docker attach
docker stop
docker logs
docker pause
docker unpause
docker exec
Docker Save:
[root@ip-172-31-34-29 ~]# docker save image_name > tar_file_name.tar
[root@ip-172-31-34-29 ~]# ls -l
total 123660
-rw-r--r-- 1 root root 126601728 Mar 2 17:58 tar_file_name.tar
========================
Docker Load:
[root@ip-172-31-34-29 ~]# docker load < demo.tar
Loaded image: demo_image:latest
=====================
Rename Container:
[root@ip-172-31-34-29 ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5e20070ee824 my_nginx_webserver "/docker-entrypoint.…" 16 hours ago Up 16 hours 0.0.0.0:8080->80/tcp, :::8080->80/tcp eloquent_tu
[root@ip-172-31-34-29 ~]# docker rename 5e20070ee824 myapp
[root@ip-172-31-34-29 ~]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5e20070ee824 my_nginx_webserver "/docker-entrypoint.…" 16 hours ago Up 16 hours 0.0.0.0:8080->80/tcp, :::8080->80/tcp myapp
[root@ip-172-31-34-29 ~]#
=======================
docker rm
docker kill - stop and remove
docker inspect
================
docker volume
https://docs.docker.com/storage/
https://www.javatpoint.com/what-is-docker-volume
Docker NEtwork:
https://docs.docker.com/network/
https://earthly.dev/blog/docker-networking/
No comments:
Post a Comment