docker-compose教程:networks自定义ip池

version: '3'
services:

  custom-tcz:
    image: "${REGISTER}/custom-tcz:${TAG}"
    command: ["--spring.profiles.active=dev"]
    ports:
      - 8069:8069
    privileged: true
    restart: always
    networks:
      custom_net:
        ipv4_address: 172.30.0.69

  custom-frontend:
    image: "${REGISTER}/custom-frontend:${TAG}"
    ports:
      - 8077:8077
    privileged: true
    restart: always
    networks:
      custom_net:
        ipv4_address: 172.30.0.77

networks:
  custom_net:
    driver: bridge
    ipam:
      config:
      - subnet: 172.30.0.0/16 

猜你喜欢

转载自blog.csdn.net/a772304419/article/details/132906950