2024-03-21 15:10:24 +01:00
|
|
|
version: "3"
|
|
|
|
networks:
|
|
|
|
shared-network:
|
|
|
|
driver: bridge
|
|
|
|
ipam:
|
|
|
|
config:
|
|
|
|
- subnet: "172.19.1.0/24"
|
|
|
|
internal-network:
|
|
|
|
driver: bridge
|
|
|
|
ipam:
|
|
|
|
config:
|
|
|
|
- subnet: "172.19.2.0/24"
|
|
|
|
|
|
|
|
services:
|
|
|
|
web1:
|
|
|
|
image: busybox
|
|
|
|
hostname: web1
|
|
|
|
command: ["/bin/busybox", "httpd", "-f", "-h", "/var/www/html", "-p", "8001"]
|
|
|
|
working_dir: /var/www/html
|
|
|
|
networks:
|
|
|
|
shared-network:
|
|
|
|
ipv4_address: "172.19.1.10"
|
2024-03-21 15:36:49 +01:00
|
|
|
podman.mac_address: "02:01:01:00:01:01"
|
2024-03-21 15:10:24 +01:00
|
|
|
internal-network:
|
|
|
|
ipv4_address: "172.19.2.10"
|
2024-03-21 15:36:49 +01:00
|
|
|
podman.mac_address: "02:01:01:00:02:01"
|
2024-03-21 15:10:24 +01:00
|
|
|
volumes:
|
|
|
|
- ./test1.txt:/var/www/html/index.txt:ro,z
|
|
|
|
web2:
|
|
|
|
image: busybox
|
|
|
|
hostname: web2
|
|
|
|
command: ["/bin/busybox", "httpd", "-f", "-h", "/var/www/html", "-p", "8001"]
|
|
|
|
working_dir: /var/www/html
|
|
|
|
mac_address: "02:01:01:00:02:02"
|
|
|
|
networks:
|
|
|
|
internal-network:
|
|
|
|
ipv4_address: "172.19.2.11"
|
|
|
|
volumes:
|
|
|
|
- ./test2.txt:/var/www/html/index.txt:ro,z
|
|
|
|
|
|
|
|
web3:
|
|
|
|
image: busybox
|
|
|
|
hostname: web2
|
|
|
|
command: ["/bin/busybox", "httpd", "-f", "-h", "/var/www/html", "-p", "8001"]
|
|
|
|
working_dir: /var/www/html
|
|
|
|
networks:
|
|
|
|
internal-network:
|
|
|
|
volumes:
|
|
|
|
- ./test3.txt:/var/www/html/index.txt:ro,z
|
|
|
|
|
|
|
|
web4:
|
|
|
|
image: busybox
|
|
|
|
hostname: web2
|
|
|
|
command: ["/bin/busybox", "httpd", "-f", "-h", "/var/www/html", "-p", "8001"]
|
|
|
|
working_dir: /var/www/html
|
|
|
|
networks:
|
|
|
|
internal-network:
|
|
|
|
shared-network:
|
|
|
|
ipv4_address: "172.19.1.13"
|
|
|
|
volumes:
|
|
|
|
- ./test4.txt:/var/www/html/index.txt:ro,z
|