I'm developing a microservice application with spring boot. While I'm devoloping microservice application, I'm using docker compose. I want to define static ip to my service. But when I define static ip, I'm getting an error.
I'm using version: '3.1' (docker-compose.yml). My error is written below. Where am I doing wrong
ERROR: for service-user user specified IP address is supported only when connecting to networks with user configured subnets
ERROR: Encountered errors while bringing up the project.
My docker-compose.yml is
service-user:
container_name: "service-user"
hostname: "service-user"
build: ../../service-user/target
ports:
- "8809:8809"
expose:
- "8809"
depends_on:
- service-eureka
environment:
- SPRING_PROFILES_ACTIVE=${profile}
networks:
backend:
ipv4_address: 172.16.238.10
networks:
backend:
driver: bridge
ipam:
config:
- subnet: 172.16.238.0/24
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…