File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 114
114
114 docker list
115
115
115 docker --help
116
116
116 docker images
117
+
118
+ -----------Registry-------------
119
+ 1. Create a container with registry docker image
120
+
121
+ docker container run -d -p 5000:5000 --name local_registry registry
122
+
123
+ 2. Access the container on 5000 port with your serverip ( system's IP)
124
+
125
+ http://<serverip>:5000/v2/_catalog
126
+
127
+ 3. Inspect the container
128
+
129
+ docker container inspect local_registry
130
+
131
+ 4. Clone the ubuntu image to localhost:5000/ubuntu:latest
132
+
133
+ docker image tag ubuntu localhost:5000/ubuntu:latest
134
+
135
+ 5. Push the image to docker registry
136
+
137
+ docker image push localhost:5000/ubuntu
138
+
139
+
140
+ 6. Pull the image with following command ( you can remove the image first and then you can run below command to restore the image)
141
+
142
+ docker image pull localhost:5000/ubuntu
143
+
144
+
117
145
118
146
------------------------Assignment-------------------------------------------
119
147
1. Create a container called webserver with ubuntu docker image. Ans :-docker contaienr run -itd --name webserver ubuntu
You can’t perform that action at this time.
0 commit comments