1.创建网络
docker network create --driver bridge --subnet 100.168.0.0/24 my_network
2.修改docker-compose启动文件
version: "2"
services:
situation-awareness-web:
restart: always
image: situation-awareness-web:0.1.0
container_name: situation-awareness-web
links:
- situation-awareness-server
ports:
- "8083:80"
networks:
my_network:
ipv4_address: 100.168.0.6
volumes:
- /data/nginx/situationAwareness/conf.d:/etc/nginx/conf.d
- /data/nginx/situationAwareness/logs:/var/log/nginx
situation-awareness-server:
restart: always
image: situation-awar