docker私有注册表

使用docker创建私有注册表

version: "3"
services:
  proxy:
    image: nginxproxy/nginx-proxy
    container_name: nginx-proxy
    restart: always
    ports:
      - 80:80
      - 443:443
    labels:
      com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
    volumes:
      - ./nginx-proxy/certs:/etc/nginx/certs:ro
      - ./nginx-proxy/config/nginx/conf.d:/etc/nginx/conf.d
      - ./nginx-proxy/acme:/acmecerts
      - ./nginx-proxy/vhost.d:/etc/nginx/vhost.d
      - ./nginx-proxy/html:/usr/share/nginx/html
      - /var/run/docker.sock:/tmp/docker.sock:ro
    networks:
      - default

  registry:
    image: registry:2
    container_name: registry
    privileged: true
    restart: always
    tty: true
    environment:
    - VIRTUAL_HOST=reg.wxy.ink
    - VIRTUAL_PORT=5000
    volumes:
    - /etc/localtime:/etc/localtime
    - /etc/default/locale:/etc/default/locale
    - /data/registry:/var/lib/registry

查看私有注册表中的镜像

curl -X GET https://reg.wxy.ink/v2/_catalog

curl -X GET https://reg.wxy.ink/v2/snowdreamtech/frpc/tags/list

作者

吴晓阳(手机:13736969112微信同号)

posted @ 2024-11-20 09:14  shiningrise  阅读(26)  评论(0编辑  收藏  举报
// 侧边栏目录 // https://blog-static.cnblogs.com/files/douzujun/marvin.nav.my1502.css