Docker Lab Notes – 17 July – 2023
Limited Time Offer!
For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!
create - start - stop - start - restart - pause - unpause - kill - rm
13 clear
14 which docker
15 which dockerd
16 which containerd
17 ps -eaf | grep dockerd
18 ps -eaf | grep containerd
19 docker help
20 clear
21 docker version
22 clear
23 docker info
24 docker images
25 clear
26 docker images
27 docker ps
28 docker ps -a
29 hisotyr
30 history
31 clear
32 vi /etc/ssh/sshd_config
33 systemctl restart sshd
34 passwd ubuntu
35 clear
36 ls
37 docker pull httpd
38 docker images
39 docker create httpd
40 docker ps
41 docker ps -a
42 docker create --name raj1 httpd
43 docker create --name raj2 httpd
44 docker ps -a
45 docker create --name raj3 httpd
46 docker ps -a
47 clear
48 docker ps -a
49 docker start raj1
50 docker ps -a
51 docker start a11abc832f57
52 docker ps -a
53 docker stop fd5374544ae1
54 docker ps -a
55 history
56 docker ps -a
57 clear
58 ls
59 docker ps
60 docker ps -a
61 docker start sree2
62 docker ps -a
63 docker start sree2
64 docker ps -a
65 docker restart raj1
66 docker ps -a
67 docker pause raj2
68 docker ps -a
69 docker starts
70 docker stats
71 clear
72 docker ps -a
73 docker unpause raj2
74 docker ps -a
75 docker kill raj1
76 docker ps
77 docker ps 0a
78 docker ps -a
79 docker rm raj1 raj2
80 docker ps -a
81 docker inspect 0e4ecd83807c
82 clear
create - start - stop - start - restart - pause - unpause - kill - rm
RUN
-------------------------------
pull + create + start + attach to container(pid1)
RUN -d
-------------------------------
pull + create + start + do not attach to container(pid1)
=================================================================
PS VS Container
-----------------------------------------------------------------
is running is running is running
coz of pid1 coz of pid1 coz of pid1
systemd systemd ANYTHING
===============================================================
DESIGNER
running ==== webserver
not runnning ==== python scrip - java - bin/bash
How to go inside
$ docker exec -it c3be9a462437 /bin/bash
91 docker stop $(docker ps -a -q)
92 docker rm -vf $(docker ps -a -q)
93 clear
94 docker ps -a
95 docker run httpd
96 docker ps -a
97 clear
98 docker run -d httpd
99 docker ps
100 clear
101 ps -eaf
102 clear
103 docker stop $(docker ps -a -q)
104 docker rm -vf $(docker ps -a -q)
105 docker ps -a
106 clear
107 ls
108 docker run httpd
109 docker ps -a
110 docker run pythonb
111 docker run python
112 clear
113 docker ps -a
114 docker start 02274950952a 1ec93832aeed
115 docker ps -a
116 docker run ubuntu
117 docker ps -a
118 docker run ubuntu ls
119 docker ps -a
120 clear
121 docker run -itd ubuntu /bin/bash
122 dockeer ps
123 docker ps
124 docker exec -it c3be9a462437 /bin/bash
125 docker -s
126 clear
127 docker ps
128 docker attach c3be9a462437
169 docker run -itd --name ram ubunut
170 docker run -itd --name ram ubuntu
171 dockeer ps
172 clear
173 dockeer ps
174 docker ps
175 docker exec -it ram /bin/bash
176 docker ps
177 docker commit -m"up-up-git-apa" -a"Rajesh Kumar" 9acaf5160c2a up-up-git-apa
178 docker images
179 docker run -itd up-up-git-apa
180 docker ps
181 docker exec 95de47a43819 git
182 docker exec 95de47a43819 which apache2
183 docker images
184 clear
185 git images
186 docker images
187 docker tag up-up-git-apa devopsschools/ramtolanka
188 docker images
189 docker login
190 docker push devopsschools/ramtolanka
191 clear
192 docker run --help
193 history