码迷,mamicode.com
首页 > 其他好文 > 详细

docker-compose.yml容器网络

时间:2019-10-22 18:18:17      阅读:111      评论:0      收藏:0      [点我收藏+]

标签:ipv4   ice   rod   backend   compose   cal   alias   容器   time   

version: ‘3‘
services:
  discover:
  build: .
  container_name: discover
  restart: always
  volumes:
    - /data/Log:/Log
    - /etc/localtime:/etc/localtime
  ports:
    - 1111:1111
  environment:
    - spring.cloud.config.profile=prod
    - user.timezone=GMT+08
  networks:
    backend:
      # aliases:
      # - my-discover-net
      ipv4_address: 192.168.101.10
networks:
  backend:
    driver: bridge
    ipam:
      config:
        - subnet: 192.168.101.0/24

 

 

 

 

networks:
  backendaa:
    ipv4_address: 192.168.101.20
networks:
  backendaa:
    external:
      name: discover_backend

docker-compose.yml容器网络

标签:ipv4   ice   rod   backend   compose   cal   alias   容器   time   

原文地址:https://www.cnblogs.com/mybxy/p/11721242.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!