3 stage is work
This commit is contained in:
@@ -3,17 +3,25 @@ version: "3"
|
||||
services:
|
||||
# ----------------------------------------------
|
||||
ngx1-net1:
|
||||
container_name: ngx1_net1
|
||||
build:
|
||||
context: .
|
||||
args:
|
||||
NET_NAME: net_1
|
||||
CONTAINER_NAME: container_1
|
||||
ports:
|
||||
- "8080:80"
|
||||
- "8081:80"
|
||||
command: >
|
||||
bash -c "apt update
|
||||
&& apt install knockd iptables iproute2 vim curl -y
|
||||
&& /root/scripts/knocking_setup.sh && nginx && knockd -d && sleep infinity"
|
||||
networks:
|
||||
- net_1
|
||||
- net_3
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
ngx2-net1:
|
||||
container_name: ngx2_net1
|
||||
build:
|
||||
context: .
|
||||
args:
|
||||
@@ -23,31 +31,40 @@ services:
|
||||
- net_1
|
||||
# ----------------------------------------------
|
||||
ngx1-net2:
|
||||
container_name: ngx1_net2
|
||||
build:
|
||||
context: .
|
||||
args:
|
||||
NET_NAME: net_2
|
||||
CONTAINER_NAME: container_1
|
||||
ports:
|
||||
- "8081:80"
|
||||
- "8082:80"
|
||||
command: >
|
||||
bash -c "apt update
|
||||
&& apt install knockd iptables iproute2 vim curl -y
|
||||
&& /root/scripts/knocking_setup.sh && nginx && knockd -d && sleep infinity"
|
||||
networks:
|
||||
- net_2
|
||||
- net_3
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
ngx2-net2:
|
||||
container_name: ngx2_net2
|
||||
build:
|
||||
context: .
|
||||
args:
|
||||
NET_NAME: net_2
|
||||
CONTAINER_NAME: container_2
|
||||
restart: on-failure
|
||||
networks:
|
||||
- net_2
|
||||
# ----------------------------------------------
|
||||
visor:
|
||||
container_name: visor
|
||||
image: ubuntu:latest
|
||||
restart: on-failure
|
||||
command: >
|
||||
bash -c "apt update
|
||||
&& apt install iproute2 vim curl nmap -y
|
||||
&& apt install iproute2 vim curl nmap knockd -y
|
||||
&& sleep infinity"
|
||||
networks:
|
||||
- net_3
|
||||
@@ -56,3 +73,9 @@ networks:
|
||||
net_1:
|
||||
net_2:
|
||||
net_3:
|
||||
driver: bridge
|
||||
ipam:
|
||||
driver: default
|
||||
config:
|
||||
- subnet: "172.28.0.0/16"
|
||||
gateway: "172.28.0.1"
|
||||
|
||||
Reference in New Issue
Block a user