So, docker-compose config
output as is:
services:
debug:
build:
context: /home/flint/services/debug
command:
- bash
- -c
- echo "$${LISTEN_ADDRESS}:$${LISTEN_PORT}"
container_name: debug
environment:
LISTEN_ADDRESS: 192.168.1.74
LISTEN_PORT: '9090'
image: debug
network_mode: host
volumes:
- read_only: true
source: /home/flint/services/debug/conf.d/debug.conf
target: /etc/debug/debug.conf
type: bind
and the docker inspect is correct too:
"Config": {
"Hostname": "cmc01.flint.net",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"Tty": false,
"OpenStdin": false,
"StdinOnce": false,
"Env": [
"LISTEN_ADDRESS=192.168.1.74",
"LISTEN_PORT=9090",
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
"DHCPD_PROTOCOL=4",
"DHCPD_INTERFACE=eth0",
"DHCPD_DEFAULT_CONFIG=/etc/dhcpd/dhcpd.conf"
],
What’s really weird is when using .env or --env-file command line with the Prometheus container it works, only env_file variable injection seems to be not correctly interpreted.