1 頁 (共 1 頁)

MAC Address

發表於 : 2017-12-29 09:00:18
yehlu
https://stackoverflow.com/questions/432 ... -container

代碼: 選擇全部

docker inspect php71 | grep MacAddress|tr -d ' ,"'|sort -u

Re: MAC Address

發表於 : 2017-12-29 14:35:11
yehlu
https://github.com/docker/compose/issues/982

代碼: 選擇全部

app_service_1:
    image: app/service_1
    mac_address: 02:42:ac:11:65:41
    expose:
        - "9090"

app_service_1:
    image: app/service_2
    mac_address: 02:42:ac:11:65:43
    expose:
        - "5558"

Re: MAC Address

發表於 : 2017-12-29 14:36:54
yehlu
https://stackoverflow.com/questions/394 ... er-compose

代碼: 選擇全部

version: '2'

services:
  mysql:
    container_name: mysql
    image: mysql:latest
    restart: always
    environment:
      - MYSQL_ROOT_PASSWORD=root
    ports:
     - "3306:3306"
    networks:
      vpcbr:
        ipv4_address: 10.5.0.5

  apigw-tomcat:
    container_name: apigw-tomcat
    build: tomcat/.
    ports:
     - "8080:8080"
     - "8009:8009"
    networks:
      vpcbr:
        ipv4_address: 10.5.0.6
    depends_on:
     - mysql

networks:
  vpcbr:
    driver: bridge
    ipam:
     config:
       - subnet: 10.5.0.0/16
         gateway: 10.5.0.1