ユーザ用ツール

サイト用ツール


サイドバー



最近の更新



Tag Cloud

タグ数量
9
10
1
3
1
2
17
7
1
1
4
13
4
1
2
325
1
9
2
7
21
5
1
31
3
3
1
6
1
1
46
1
3
3
1
1
1
1
1
1
35
46
7
9
10
8
10
3
22
2
9
2
2
6
9
1
1
6
12
4
3
3
2
1
8
2
4
1
6
30
2
12
5
3
1
1
2
3
2
1
3
4
3
3
4
2
2
1
1
2
1
2
1
2
1
27
2
1
3
2
2
1
1
2
3
17
5
9
1
1
2
18
2
6
1
2
12
1
3
1
1
4
12
1
6
4
2
7
1
3
2
13
1
4
1
1
11
3
1
18
3
1
5
1
2
1
1
2
10
2
2
3
2
1
3
1
3
1
2
2
2
1
2
6
1
4
3
5
1
3
1
3
3
2
1
1
30
1
3
3
1
1
1
5
5
1
36
2
4
2
1
2
2
3
1
1
1
4
1
2
1
3
1
1
1
2
5
2
5
2
1
1
1
5
3
2
4
7
1
2
2
27
1
1
3
5
1
1
2
1
1
2
1
1
1
1
2
1
1
1
1
2
20
8
1
7
1
1
3
1
2
2
1
2
1
1
1
1
1
1
2
1
1
2
1
1
1
1
1
1
1
5
2
1
1
2
2
2
1
1
2
1
1
1
12
1
1
1
1
1
1
1
1
1
1
1
1
1
2
1
1
1
1
2
2
06_virtualization:05_container:22_docker_private_registry

22 Docker Private registry

Docker用のローカルRepogitoryを用意してみる。

Port:4000でローカルregistry用意

docker run -d \
 --name registry \
 --restart=always \
 -p 4000:5000 \
 -v registry:/var/lib/registry \
 registry:2

image作成

insecure(HTTP)で通信できるようにしておく

# cat << __EOM__ | tee /etc/docker/daemon.json
{ "insecure-registries":["192.168.10.10:4000"] }
__EOM__

systemctl restart docker

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

確認

$ curl -sk http://192.168.10.10:4000/v2/_catalog | jq
{
  "repositories": [
    "my-centos7"
  ]
}

他のノードからPullしてみる

docker pull 192.168.10.10:4000/my-centos7

image一覧確認

$ curl -sk http://192.168.10.10:4000/v2/_catalog | jq
{
  "repositories": [
    "kolla/cinder-api",
    "kolla/cinder-scheduler",
    "kolla/cinder-volume",
    "kolla/cron",
    "kolla/fluentd",
    "kolla/glance-api",
    "kolla/haproxy",
    "kolla/heat-api",
    "kolla/heat-api-cfn",
    "kolla/heat-engine",
    "kolla/horizon",
    "kolla/keepalived",
    "kolla/keystone",
    "kolla/keystone-fernet",
    "kolla/keystone-ssh",
    "kolla/kolla-toolbox",
    "kolla/mariadb-clustercheck",
    "kolla/mariadb-server",
    "kolla/memcached",
    "kolla/neutron-dhcp-agent",
    "kolla/neutron-l3-agent",
    "kolla/neutron-metadata-agent",
    "kolla/neutron-openvswitch-agent",
    "kolla/neutron-server",
    "kolla/nova-api",
    "kolla/nova-compute",
    "kolla/nova-conductor",
    "kolla/nova-libvirt",
    "kolla/nova-novncproxy",
    "kolla/nova-scheduler",
    "kolla/nova-ssh",
    "kolla/openvswitch-db-server",
    "kolla/openvswitch-vswitchd",
    "kolla/placement-api",
    "kolla/rabbitmq",
    "kolla/test"
  ]
}

imageのタグ一覧

$ curl -sk http://192.168.10.201:4000/v2/kolla/haproxy/tags/list | jq
{
  "name": "kolla/haproxy",
  "tags": [
    "xena",
    "yoga"
  ]
}

実ファイルのpath

docker volumesの下にregistryというフォルダができてるので、それをバックアップしておけば良いと思います。

# # 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
06_virtualization/05_container/22_docker_private_registry.txt · 最終更新: 2022/08/31 16:50 by matsui

Yesterday:380 Today:530 Total:108974