Thanks for the report.
Unfortunately I’m unable to reproduce…
$ export HOSTNAME=foo
$ docker compose up
Creating foo_test_1
Attaching to foo_test_1
test_1 | PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
test_1 | HOSTNAME=125412e7116e
test_1 | HOST_HOSTNAME=foo
test_1 | HOME=/root
foo_test_1 exited with code 0
The only thing that I can think of is that variable HOSTNAME
isn’t exported to the child process, in this case, docker-compose
.
For example, the following won’t work…
HOSTNAME=foo
docker-compose up