Skip to content

Commit

Permalink
Attached containers directly to the host's network namespace (fix #1) 🔧
Browse files Browse the repository at this point in the history
Signed-off-by: mi2428 <[email protected]>
  • Loading branch information
mi2428 committed Feb 27, 2019
1 parent 9b663e5 commit 3abe793
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 45 deletions.
2 changes: 1 addition & 1 deletion 4000_mgmt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Dhcp4": {
"interfaces-config": {
"interfaces": [
"*"
"ens160"
],
"dhcp-socket-type": "raw"
},
Expand Down
2 changes: 1 addition & 1 deletion 4010_noc-private.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Dhcp4": {
"interfaces-config": {
"interfaces": [
"*"
"ens161"
],
"dhcp-socket-type": "raw"
},
Expand Down
2 changes: 1 addition & 1 deletion 4030_camp-guest.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Dhcp4": {
"interfaces-config": {
"interfaces": [
"*"
"ens256"
],
"dhcp-socket-type": "raw"
},
Expand Down
2 changes: 1 addition & 1 deletion 4031_camp-guest-nofw.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Dhcp4": {
"interfaces-config": {
"interfaces": [
"*"
"ens192"
],
"dhcp-socket-type": "raw"
},
Expand Down
2 changes: 1 addition & 1 deletion 4032_camp-guest-isp.conf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"Dhcp4": {
"interfaces-config": {
"interfaces": [
"*"
"ens224"
],
"dhcp-socket-type": "raw"
},
Expand Down
10 changes: 1 addition & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
.PHONY: default
default: init run log

.PHONY: init
init:
docker network create -d bridge -o parent=ens160 mgmt
docker network create -d bridge -o parent=ens161 noc-private
docker network create -d bridge -o parent=ens192 camp-guest-nofw
docker network create -d bridge -o parent=ens224 camp-guest-isp
docker network create -d bridge -o parent=ens256 camp-guest
default: run log

.PHONY: run
run:
Expand Down
36 changes: 5 additions & 31 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ services:
- ./4000_mgmt.conf:/etc/kea/kea-dhcp4.conf:ro
ports:
- 10.0.100.0:67:67
networks:
vid4000:
network_mode: host

kea-dhcp-noc-private:
# build: .
Expand All @@ -22,8 +21,7 @@ services:
- ./4010_noc-private.conf:/etc/kea/kea-dhcp4.conf:ro
ports:
- 203.178.156.66:67:67
networks:
vid4010:
network_mode: host

kea-dhcp-cmap-guest:
# build: .
Expand All @@ -34,8 +32,7 @@ services:
- ./4030_camp-guest.conf:/etc/kea/kea-dhcp4.conf:ro
ports:
- 203.178.158.2:67:67
networks:
vid4030:
network_mode: host

kea-dhcp-cmap-guest-nofw:
# build: .
Expand All @@ -46,8 +43,7 @@ services:
- ./4031_camp-guest-nofw.conf:/etc/kea/kea-dhcp4.conf:ro
ports:
- 203.178.157.2:67:67
networks:
vid4031:
network_mode: host

kea-dhcp-cmap-guest-isp:
# build: .
Expand All @@ -58,26 +54,4 @@ services:
- ./4032_camp-guest-isp.conf:/etc/kea/kea-dhcp4.conf:ro
ports:
- 10.0.32.2:67:67
networks:
vid4032:

networks:
vid4000:
external:
name: mgmt

vid4010:
external:
name: noc-private

vid4030:
external:
name: camp-guest

vid4031:
external:
name: camp-guest-nofw

vid4032:
external:
name: camp-guest-isp
network_mode: host

0 comments on commit 3abe793

Please sign in to comment.