[ 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
This commit is contained in:
+36
@@ -0,0 +1,36 @@
|
||||
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
|
||||
Reference in New Issue
Block a user