version: '3.8' services: xbee-node: build: . container_name: xbee_node privileged: true env_file: - .env devices: - "${XBEE0_PORT}:${XBEE0_PORT}" command: > bash -c " xbnet -d --serial-speed ${XBEE0_BAUDRATE} ${XBEE0_PORT} tun; ip addr add ${XBEE1_NET_SRC_IP}/24 dev xbnet0; ip link set dev xbnet0 up; ping -c 4 ${XBEE1_NET_DST_IP}; sleep infinity "