运维开发网

docker仓库快速搭建

运维开发网 https://www.qedev.com 2020-07-15 16:56 出处:网络 作者:运维开发网整理
通过docker-compose.yml搭建docker仓库,记录:     version: ‘3.1‘ services:   registry:     image: registry     restart: always     container_name: registry     environment:       - user.timezone=GMT+08     ports

通过docker-compose.yml搭建docker仓库,记录:

 

 

version: ‘3.1‘

services:

  registry:

    image: registry

    restart: always

    container_name: registry

    environment:

      - user.timezone=GMT+08

    ports:

      - 5000:5000

    volumes:

      - /etc/localtime:/etc/localtime

      - /opt/bxy_registry:/var/lib/registry

#docker仓库web界面

  frontend:

    image: konradkleine/docker-registry-frontend:v2

    restart: always

#depends_on:对于此服务,先启动registry服务    depends_on:      - registry    extra_hosts:      bxy-registry: 172.17.31.68    ports:      - 8080:80    volumes:      - /etc/localtime:/etc/localtime      - ./certs/frontend.crt:/etc/apache2/server.crt:ro      - ./certs/frontend.key:/etc/apache2/server.key:ro    environment:      - user.timezone=GMT+08      - ENV_DOCKER_REGISTRY_HOST=bxy-registry      - ENV_DOCKER_REGISTRY_PORT=5000

0

精彩评论

暂无评论...
验证码 换一张
取 消