修改docker镜像IP

发布时间:2023年12月26日

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
文章来源:https://blog.csdn.net/qq_28687183/article/details/135213136
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。