https://www.devopsschool.com/blog/the-docker-command-line-complete-referenece/
54 ls
55 sudo apt-get update
56 sudo apt-get install ca-certificates curl gnupg lsb-release
57 sudo mkdir -p /etc/apt/keyrings
58 curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
59 echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
60 sudo apt-get update
61 sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
62 clear
63 ls
64 which docker
65 which dockerd
66 ps -eaf | grep dockerd
67 which containerd
68 clesar
69 ls
70 clear
71 ls
72 docker info
73 clear
74 ls
75 docker ps -a
76 clear
77 docker info
78 clear
79 docker ps
80 docker ps -a
81 clear
82 docker images
83 docker version
84 clear
85 history
86 clear
87 ls
88 docker pull httpd
89 docker images
90 clear
91 ls
92 docker images
93 docker create httpd
94 docker ps
95 docker ps -a
96 docker create httpd
97 docker ps -a
98 docker start c8cdcd294617
99 docker ps -a
100 docker start c0a28fe02817
101 docker ps -a
102 docker stop heuristic_torvalds
103 docker ps -a
104 docker restart c0a28fe02817
105 docker ps -a
106 docker pause c0a28fe02817
107 docker ps -a
108 docker stats
109 docker ps -a
110 docker unpause c0a28fe02817
111 docker ps -a
112 docker kill c0a28fe02817
113 docker ps -a
114 docker rm c0a28fe02817
115 docker rm c8cdcd294617
116 docker ps -a
How to use container?
Go inside -
using bash
Access from outside --- http
=========================================================
run
pull + create + start + attach
run -d
pull + create + start + deattach
docker run -d -p 82:80 httpd
docker run -d -p 81:80 httpd
===========================================
ubuntu + git + java + apache2 == devopsschool
using Container
Dockerfile
FROM ubuntu
MAINTAINER Rajesh kumar
RUN apt-get update
RUN apt-get install git -y
RUN apt-get install apache2 -y
117 history
118 clear
119 w
120 ps
121 docker ps
122 docker ps -a
123 docker start d8ed29769e87
124 docker ps -a
125 docker exec d8ed29769e87 ls
126 docker exec d8ed29769e87 du -sh
127 docker exec -it d8ed29769e87 /bin/bash
128 docker exec d8ed29769e87 du -sh
129 docker exec -it d8ed29769e87 /bin/bash
130 clear
131 ls
132 docker ps
133 docker inspect d8ed29769e87
134 curl http://172.17.0.2
135 clear
136 docker run httpd
137 docker ps -a
138 docker run -d httpd
139 docker ps
140 clear
141 docker run -d -p 80:80 httpd
142 docker run -d -p 81:80 httpd
143 docker run -d -p 82:80 httpd
144 docker ps
145 docker inspect 3b66722cd442
146 curl http://172.17.0.6
147 ip a
148 curl http://172.31.40.0:81
149 clear
150 ls
151 docker ps
152 docker logs 3b66722cd442
153 clear
154 ls
155 clear
156 ls
157 docker ps
158 docker run -itd ubuntu
159 docker ps
160 docker exec -it b998fde0fba2 /bin/bash
161 clear
162 docker ps
163 docker commit -m"ub-git-ap" -a"Rajesh" b998fde0fba2 devopsschool
164 docker images
165 docker run -itd devopsschool
166 docker ps
167 docker exec 03a18c898717 git
168 clear
169 docker ps
170 clear
171 ls
172 vi dockerfile
173 docker build -t devops2 .
174 docker images
175 docker login
176 docker images
177 docker tag devops2 devopsschools/vipul
178 docker images
179 docker push devopsschools/vipul
180 docker login
181 docker push devopsschools/vipul
182 history