ユーザ用ツール

サイト用ツール


06_virtualization:05_container:22_docker_private_registry

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
06_virtualization:05_container:22_docker_private_registry [2022/06/23 05:36] matsui06_virtualization:05_container:22_docker_private_registry [2022/08/31 07:50] (現在) matsui
行 14: 行 14:
  registry:2  registry:2
 </code> </code>
 +
 +
 +===== image作成 =====
 +
 +[[06_virtualization:05_container:11_docker_create_image]]
 +
 +
 +==== insecure(HTTP)で通信できるようにしておく ====
 +
 +<code>
 +# cat << __EOM__ | tee /etc/docker/daemon.json
 +{ "insecure-registries":["192.168.10.10:4000"] }
 +__EOM__
 +
 +systemctl restart docker
 +</code>
 +===== image push =====
 +
 +タグを付けて
 +  docker tag my-centos7:latest 192.168.10.10:4000/my-centos7:latest
 +
 +Push
 +  docker push 192.168.10.10:4000/my-centos7:latest
 +
 +確認
 +<code>
 +$ curl -sk http://192.168.10.10:4000/v2/_catalog | jq
 +{
 +  "repositories": [
 +    "my-centos7"
 +  ]
 +}
 +</code>
 +
 +他のノードからPullしてみる
 +  docker pull 192.168.10.10:4000/my-centos7
  
 ===== image一覧確認 ===== ===== image一覧確認 =====
  
 <code> <code>
-$ curl -sk http://192.168.10.201:4000/v2/_catalog | jq+$ curl -sk http://192.168.10.10:4000/v2/_catalog | jq
 { {
   "repositories": [   "repositories": [
行 73: 行 109:
   ]   ]
 } }
 +</code>
 +
 +
 +===== 実ファイルのpath =====
 +
 +docker volumesの下にregistryというフォルダができてるので、それをバックアップしておけば良いと思います。
 +
 +<code>
 +# # ls -al /var/lib/docker/volumes/registry
 +total 12
 +drwx-----x 3 root root 4096 Aug 31 06:22 .
 +drwx-----x 3 root root 4096 Aug 31 06:22 ..
 +drwxr-xr-x 3 root root 4096 Aug 31 06:54 _data
 +
 +
 +# ls -al /var/lib/docker/volumes/registry/_data/docker/registry/v2/repositories/kolla/
 +total 164
 +drwxr-xr-x 41 root root 4096 Aug 31 07:01 .
 +drwxr-xr-x  3 root root 4096 Aug 31 06:54 ..
 +drwxr-xr-x  5 root root 4096 Aug 31 06:54 base
 +drwxr-xr-x  5 root root 4096 Aug 31 06:55 cinder-api
 +drwxr-xr-x  5 root root 4096 Aug 31 06:55 cinder-backup
 +drwxr-xr-x  5 root root 4096 Aug 31 06:55 cinder-base
 +drwxr-xr-x  5 root root 4096 Aug 31 06:55 cinder-scheduler
 +drwxr-xr-x  5 root root 4096 Aug 31 06:55 cinder-volume
 +drwxr-xr-x  5 root root 4096 Aug 31 07:01 cron
 +drwxr-xr-x  5 root root 4096 Aug 31 07:01 fluentd
 +drwxr-xr-x  5 root root 4096 Aug 31 06:57 glance-api
 +drwxr-xr-x  5 root root 4096 Aug 31 07:01 haproxy
 +drwxr-xr-x  5 root root 4096 Aug 31 06:57 heat-api
 +drwxr-xr-x  5 root root 4096 Aug 31 06:57 heat-api-cfn
 +drwxr-xr-x  5 root root 4096 Aug 31 06:57 heat-engine
 +drwxr-xr-x  5 root root 4096 Aug 31 06:57 horizon
 +drwxr-xr-x  5 root root 4096 Aug 31 07:01 keepalived
 +drwxr-xr-x  5 root root 4096 Aug 31 06:58 keystone
 +drwxr-xr-x  5 root root 4096 Aug 31 06:58 keystone-fernet
 +drwxr-xr-x  5 root root 4096 Aug 31 06:58 keystone-ssh
 +drwxr-xr-x  5 root root 4096 Aug 31 07:01 kolla-toolbox
 +drwxr-xr-x  5 root root 4096 Aug 31 06:58 mariadb-clustercheck
 +drwxr-xr-x  5 root root 4096 Aug 31 06:58 mariadb-server
 +drwxr-xr-x  5 root root 4096 Aug 31 07:01 memcached
 +drwxr-xr-x  5 root root 4096 Aug 31 06:57 neutron-dhcp-agent
 +drwxr-xr-x  5 root root 4096 Aug 31 06:57 neutron-l3-agent
 +drwxr-xr-x  5 root root 4096 Aug 31 06:57 neutron-metadata-agent
 +drwxr-xr-x  5 root root 4096 Aug 31 06:57 neutron-openvswitch-agent
 +drwxr-xr-x  5 root root 4096 Aug 31 06:57 neutron-server
 +drwxr-xr-x  5 root root 4096 Aug 31 06:57 nova-api
 +drwxr-xr-x  5 root root 4096 Aug 31 06:56 nova-compute
 +drwxr-xr-x  5 root root 4096 Aug 31 06:57 nova-conductor
 +drwxr-xr-x  5 root root 4096 Aug 31 07:00 nova-libvirt
 +drwxr-xr-x  5 root root 4096 Aug 31 06:56 nova-novncproxy
 +drwxr-xr-x  5 root root 4096 Aug 31 06:57 nova-scheduler
 +drwxr-xr-x  5 root root 4096 Aug 31 06:56 nova-ssh
 +drwxr-xr-x  5 root root 4096 Aug 31 06:55 openstack-base
 +drwxr-xr-x  5 root root 4096 Aug 31 07:00 openvswitch-db-server
 +drwxr-xr-x  5 root root 4096 Aug 31 07:00 openvswitch-vswitchd
 +drwxr-xr-x  5 root root 4096 Aug 31 06:57 placement-api
 +drwxr-xr-x  5 root root 4096 Aug 31 07:01 rabbitmq
 </code> </code>
  
 {{tag>Docker}} {{tag>Docker}}
06_virtualization/05_container/22_docker_private_registry.1655962561.txt.gz · 最終更新: 2022/06/23 05:36 by matsui