Skip to content

Commit 95d5079

Browse files
Update Sunlife_Notes
1 parent ca2c0ba commit 95d5079

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

Sunlife_Notes

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,34 @@
114114
114 docker list
115115
115 docker --help
116116
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+
117145

118146
------------------------Assignment-------------------------------------------
119147
1. Create a container called webserver with ubuntu docker image. Ans :-docker contaienr run -itd --name webserver ubuntu

0 commit comments

Comments
 (0)