-
Notifications
You must be signed in to change notification settings - Fork 614
Expand file tree
/
Copy pathcreating_private_registry
More file actions
27 lines (24 loc) · 893 Bytes
/
creating_private_registry
File metadata and controls
27 lines (24 loc) · 893 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
95 . 1. Create a docker volume Run registry server and bind it docker volume
docker run -d \
-p 5000:5000 \
--restart=always \
--name registry \
-v /mnt/registry:/var/lib/registry \
registry:2
2.Push any image to the local registry and paste the output here
Stop and remove the registry and paste the output of the command docker ps
Launch local registry again but with the same volume you had created earlier
Pull the image that was pushed a while back and paste the output here
docker pull ubuntu:16.04
docker tag ubuntu:16.04 localhost:5000/my-ubuntu
docker push localhost:5000/my-ubuntu
docker container stop registry && docker container rm -v registry
docker rm -f 9f8c11f0893b
docker rmi -f 1fd8e1b0bb7e
docker run -d \
-p 5000:5000 \
--restart=always \
--name registry \
-v /mnt/registry:/var/lib/registry \
registry:2
docker pull localhost:5000/my-ubuntu