Created
January 27, 2021 12:03
-
-
Save ovuruska/60fb26f1f7c8ae7fb860b28a63f51a5e to your computer and use it in GitHub Desktop.
Networking example in docker-compose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
iot_1: | |
build: | |
context: . | |
dockerfile: iot.Dockerfile | |
networks: | |
closed_network: | |
ipv4_address: 10.5.0.2 | |
iot_2: | |
build: | |
context: . | |
dockerfile: iot.Dockerfile | |
networks: | |
closed_network: | |
ipv4_address: 10.5.0.3 | |
iot_3: | |
build: | |
context: . | |
dockerfile: iot.Dockerfile | |
networks: | |
closed_network: | |
ipv4_address: 10.5.0.4 | |
iot_4: | |
build: | |
context: . | |
dockerfile: iot.Dockerfile | |
networks: | |
closed_network: | |
ipv4_address: 10.5.0.5 | |
pc: | |
depends_on: | |
- iot_1 | |
- iot_2 | |
- iot_3 | |
- iot_4 | |
build: | |
context: . | |
dockerfile: pc.Dockerfile | |
networks: | |
closed_network: | |
ipv4_address: 10.5.0.6 | |
networks: | |
closed_network: | |
driver: bridge | |
ipam: | |
config: | |
- subnet : 10.5.0.0/16 | |
gateway : 10.5.0.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment