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"]
}

最后修改:2024 年 05 月 11 日
如果觉得我的文章对你有用,请随意赞赏