Docker
Akshay Padale
?? System Administrator | Linux | AWS Cloud | RHCSA Certified | DevOps | CI/CD | Automation | Kubernetes | Docker | Cloud Architect
#### Docker?
=============================
Installation ref : https://docs.docker.com/engine/install/ubuntu/
## Docker images ? list locally available images
## Docker Run ?? creates new container
## Docker exec ? execute instructions in the container bash?
## Docker start ?? start exited container (like power on)
## Docker stop ? stop running container (like power off)
?
?57? docker search debian
???58? docker pull debian
???59? docker images
???60? docker run --interactive --tty --name container1 debian:latest
ls
cat /etc/os-release
ls
touch sample{1..10}
ls
exit
???61? docker ps -a
???62? docker run -it --name container2 debian:latest
ls
cat /etc/os-release
ls
touch unnati{1..10}.doc
ls
exit
???63? docker ps -a
???64? docker run -itd --name container3 debian:latest
???65? docker run -it --detach --name container4 debian:latest
???66? docker ps -a
???67? docker exec -it container3 ls /
???68? docker exec -it container3 cat /etc/os-release
???69? docker exec -it container3 cat /etc/passwd
???70? docker exec -it container3 bash
cat /etc/os-release
ls
???71? docker ps -a
???72? docker stop container3
???73? docker stop container4
???74? docker ps -a
???75? docker exec -it container1 bash
???76? docker start container1
???77? docker ps -a
???78? docker exec -it container1 bash
???79? docker stop container1
==================================================
### Exploring Container resources?
==================================
190? docker pull fedora
??191? docker images
??192? docker inspect fedora:latest?
??193? docker run -itd --name containerX fedora:latest
??194? docker ps
??195? docker inspect containerX?
??196? docker stats?
??197? docker stats containerX
??198? ps -ef | grep f5eae02cd366
??199? docker exec -it containerX ls /
??202? docker exec -it containerX mkdir /test
??203? docker exec -it containerX ls /
??204? docker stop containerX?
??205? docker ps
??206? docker ps -a
??207? ps -ef | grep f5eae02cd366
??208? docker inspect containerX?
??209? docker stats containerX
??210? docker exec -it containerX ls