docker-compose文件
version: '3'
services:
registry:
image: registry:2
ports:
- 172.31.20.2:5000:5000
volumes:
- ./data:/var/lib/registry
networks:
mynetwork:
ipv4_address: 172.31.20.2
networks:
mynetwork:
ipam:
config:
- subnet: 172.31.20.0/24
客户端文件
{
"registry-mirrors": ["http://localhost:5000"],
"insecure-registries": ["localhost:5000"]
}