1、服务部署配置

version: '3'
services:
  pig-ui:
    image: pig-ui:latest
    container_name: pig-ui
    restart: always
    networks:
      - pig_default
    external_links:
      - pig-gateway
    ports:
      - 80:80
    extra_hosts:
      - "pig-gateway:172.19.24.143"    #指定额外的 host 名称映射信息
    environment:
      - TZ=Asia/Shanghai

networks:
  pig_default:
    external: true

参考:

https://github.com/pig-mesh/pig-ui/blob/jdk17/docker/docker-compose.yaml
https://yeasy.gitbook.io/docker_practice/compose/compose_file

  

posted on 2023-09-06 11:19  a120608yby  阅读(79)  评论(0编辑  收藏  举报