2021-11-21 00:23:29 +01:00
|
|
|
version: "3"
|
|
|
|
networks:
|
|
|
|
net1:
|
|
|
|
net2:
|
|
|
|
services:
|
|
|
|
web1:
|
|
|
|
image: busybox
|
2021-11-21 11:35:13 +01:00
|
|
|
#container_name: web1
|
2021-11-21 00:23:29 +01:00
|
|
|
hostname: web1
|
|
|
|
command: ["/bin/busybox", "httpd", "-f", "-h", "/var/www/html", "-p", "8001"]
|
|
|
|
working_dir: /var/www/html
|
|
|
|
networks:
|
|
|
|
- net1
|
|
|
|
ports:
|
2021-11-24 16:37:17 +01:00
|
|
|
- 8001:8001
|
2021-11-21 00:23:29 +01:00
|
|
|
volumes:
|
2021-11-24 16:37:17 +01:00
|
|
|
- ./test1.txt:/var/www/html/index.txt:ro,z
|
2021-11-21 00:23:29 +01:00
|
|
|
web2:
|
|
|
|
image: busybox
|
2021-11-21 11:35:13 +01:00
|
|
|
#container_name: web2
|
2021-11-21 00:23:29 +01:00
|
|
|
hostname: web2
|
|
|
|
command: ["/bin/busybox", "httpd", "-f", "-h", "/var/www/html", "-p", "8001"]
|
|
|
|
working_dir: /var/www/html
|
|
|
|
networks:
|
|
|
|
- net1
|
|
|
|
- net2
|
|
|
|
ports:
|
2021-11-24 16:37:17 +01:00
|
|
|
- 8002:8001
|
2021-11-21 00:23:29 +01:00
|
|
|
volumes:
|
2021-11-24 16:37:17 +01:00
|
|
|
- ./test2.txt:/var/www/html/index.txt:ro,z
|
2021-12-25 20:06:29 +01:00
|
|
|
web3:
|
|
|
|
image: busybox
|
|
|
|
command: ["/bin/busybox", "httpd", "-f", "-h", "/var/www/html", "-p", "8001"]
|
|
|
|
working_dir: /var/www/html
|
|
|
|
networks:
|
|
|
|
net1:
|
|
|
|
aliases:
|
|
|
|
- alias11
|
|
|
|
- alias12
|
|
|
|
net2:
|
|
|
|
aliases:
|
|
|
|
- alias21
|
|
|
|
volumes:
|
|
|
|
- ./test2.txt:/var/www/html/index.txt:ro,z
|
2021-11-21 00:23:29 +01:00
|
|
|
|