From 07a531d13841ce50c6ca1044d9504bcf334f89dc Mon Sep 17 00:00:00 2001 From: Sam Mesterton-Gibbons Date: Mon, 14 Feb 2022 01:16:17 +0000 Subject: [PATCH] Add docker-compose file for alternative way to run Adds a compose file to allow running the contianer with ipvlan networking on a separate IP address, rather than trying to open ports on the host. --- docker-compose.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..472718e --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,24 @@ +--- +version: "2.1" +services: + netbootxyz: + container_name: netbootxyz + build: + context: . + environment: + - DHCP_RANGE_START=${SUBNET:-192.168.0.1} + networks: + netbootxyz_network: + ipv4_address: ${CONTAINER_IP:-192.168.0.250} + cap_add: + - NET_ADMIN +networks: + netbootxyz_network: + driver: ipvlan + driver_opts: + parent: ${INTERFACE:-eth0} + ipam: + config: + - subnet: ${SUBNET:-192.168.0.1}/${SUBNET_PREFIX_BITS:-24} + gateway: ${GATEWAY:-192.168.0.1} + ip_range: ${CONTAINER_IP:-192.168.0.250}/32