Files
spring-boot-rest/docker-modules/docker-compose-2/communication_same_machine/static_ip_macvlan/docker-compose.yml
lucaCambi77 cb71de5be1 [ BAEL-6068 ] - Communicating with Docker containers on the same machine (#13343)
* fix: build clean up

* feat: add docker compose 2 module, add communication same machine docker compose

* fix: remove unused package lock file
2023-01-26 20:42:54 -06:00

36 lines
676 B
YAML

services:
alpine-app-1:
container_name: alpine-app-1
build:
context: ..
dockerfile: Dockerfile
image: alpine-app-1
tty: true
ports:
- 8080:8080
networks:
network-example:
ipv4_address: 192.168.2.2
alpine-app-2:
container_name: alpine-app-2
build:
context: ..
dockerfile: Dockerfile
image: alpine-app-2
tty: true
ports:
- 8081:8081
networks:
network-example:
ipv4_address: 192.168.2.3
networks:
network-example:
driver: macvlan
driver_opts:
parent: enp0s3
ipam:
config:
- subnet: 192.168.2.0/24
gateway: 192.168.2.1