1 2 3 4 5 6 7 8 9 10 11 12 | [root@dashdb ~]# <strong>docker pull registry:2.1.1</strong> 2.1.1: Pulling from library/registry 9943fffae777: Pull complete fb15e825cb68: Pull complete b9583a207297: Pull complete a3ed95caeb02: Pull complete 87fee1c528e9: Pull complete 829473b2393f: Pull complete 2c1adb4b358c: Pull complete Digest:sha256:4a9bc5424fa7cc4fafd88b5d8dfb102ceb339e8f418fdeca7f094c86db284f1c Statusownloaded newer image for registry:2.1.1 [root@dashdb ~]# |
1 2 3 | [root@dashdb ~]#mkdir opt data registry [root@dashdb ~]#docker run -d -v /opt/data/registry:/var/lib/registry -p 5000:5000 --restart=always --name registry registry:2.1.1 3b54f2643bfabc5d307ca34cc2cf6a01add6a82142bb3f1c7d72aed1801c6e17 |
1 2 3 4 5 | [root@dashdb ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 3b54f2643bfa registry:2.1.1 "/bin/registry /etc/d" 50 seconds ago Up 46 seconds 0.0.0.0:5000->5000/tcp registry 8ce6b3be54c5 ibmdashdb/local:latest-linux "/usr/sbin/init" 26 hours ago Up About an hour dashDB [root@dashdb ~]# |
1 2 3 4 5 6 | [root@dashdb ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE ibmdashdb/local latest-linux 60529ca767cc 5 weeks ago 6.257 GB hello-world latest c54a2cc56cbb 3 months ago 1.848 kB registry 2.1.1 52bb991b482e 11 months ago 220.1 MB [root@dashdb ~]# |
1 | [root@dashdb ~]# docker tag ibmdashdb/local:latest-linux 192.168.1.128:5000/ibmdashdb:v1 |
1 2 3 4 5 6 7 8 | [root@dashdb ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE 192.168.1.128:5000/ibmdashdb v1 60529ca767cc 5 weeks ago 6.257 GB ibmdashdb/local latest-linux 60529ca767cc 5 weeks ago 6.257 GB hello-world latest c54a2cc56cbb 3 months ago 1.848 kB registry 2.1.1 52bb991b482e 11 months ago 220.1 MB |
1 2 3 4 5 6 7 | [root@dashdb docker]# vi/etc/docker/daemon.json { "insecure-registries":["192.168.1.128:5000"] } 然后重启 docker 后台进程: [root@dashdb docker]# service docker restart Redirecting to /bin/systemctl restart docker.service |
1 2 3 4 5 6 7 8 9 10 11 | [root@dashdb docker]# docker push 192.168.1.128:5000/ibmdashdb:v1 The push refers to a repository [192.168.1.128:5000/ibmdashdb] 5f70bf18a086: Preparing 5f70bf18a086: Preparing 81c5b3dd8180: Pushed a17582c66db1: Pushed f5f562b78761: Pushed 2613a97eb436: Pushed 45bbdab17cd6: Pushed . . . . . . v1: digest:sha256:418dd6a2f2ce29b0558e1ce1a7ff45b6c7d0e18d239aa344692137b6bfde3ff1 size:22813 |
1 2 3 4 | [root@dashdb v2]# cd /opt/data/registry/docker/registry/v2 [root@dashdb v2]# ls blobs repositories [root@dashdb v2]# |
1 2 3 4 5 6 7 8 9 10 11 | [root@dashdb ~]# docker rm dashDB dashDB [root@dashdb ~]# docker rmi ibmdashdb/local:latest-linux Untagged:ibmdashdb/local:latest-linux Untagged:ibmdashdb/local@sha256:44c2a86d69f75cf8edbbd2e9731ff2a4765c2ac6b445923261285c7e8f25306a [root@dashdb ~]# docker rmi -f 192.168.1.128:5000/ibmdashdb:v1 Untagged: 192.168.1.128:5000/ibmdashdb:v1 Untagged: 192.168.1.128:5000/ibmdashdb@sha256:418dd6a2f2ce29b0558e1ce1a7ff45b6c7d0e18d239aa344692137b6bfde3ff1 Deleted: sha256:60529ca767cc20fec5662993084eb20306bd3de752f35170be937efe94e2c256 [root@dashdb ~]# |
1 2 3 4 5 6 7 8 9 10 11 12 13 | [root@dashdb ~]# docker pull 192.168.1.128:5000/ibmdashdb:v1 v1: Pulling from ibmdashdb a3ed95caeb02: Pulling fs layer da71393503ec: Pulling fs layer 6c10d4976ba0: Pull complete 726a72c3b3a4: Pull complete eb1286efed60: Pull complete 4d4e82e01106: Pull complete 09e7c85fb5b9: Pull complete . . . . . . Digest:sha256:418dd6a2f2ce29b0558e1ce1a7ff45b6c7d0e18d239aa344692137b6bfde3ff1 Statusownloaded newer image for 192.168.1.128:5000/ibmdashdb:v1 [root@dashdb~]# |
1 2 3 4 5 6 | [root@dashdb ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE 192.168.1.128:5000/ibmdashdb v1 60529ca767cc 5 weeks ago 6.257 GB hello-world latest c54a2cc56cbb 3 months ago 1.848 kB registry 2.1.1 52bb991b482e 11 months ago 220.1 MB [root@dashdb ~]# |
1 2 3 4 5 6 7 | [root@dashdb ~]# docker run -d -it --privileged=true --net=host--name=dashDB -v /mnt/clusterfs:/mnt/bludata0 -v /mnt/clusterfs:/mnt/blumeta0 192.168.1.128:5000/ibmdashdb:v1 50810d3b17e735628fc25244c3552a1e34dd8eec7ed5f57807e052b15478e75c [root@dashdb ~]# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 50810d3b17e7 192.168.1.128:5000/ibmdashdb:v1 "/usr/sbin/init" 8 seconds ago Up 6 seconds dashDB 3b54f2643bfa registry:2.1.1 "/bin/registry /etc/d" About an hour ago Up About an hour 0.0.0.0:5000->5000/tcp registry 22ecd685ad6e hello-world "/hello" 30 hours ago Exited (0) 30 hours ago sleepy_ardinghelli |
1 2 3 | [root@dashdb ~]# docker start dashDB dashDB [root@dashdb ~]# docker exec -it dashDB start |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |