For a variety of reasons, my Docker container needs to use systemd. Getting that going is not a problem; a number of people posted the Dockerfile changes needed to a stock CentOS 7 image.
I would also like to pass in environment variables to my container, both with the -e flag and with docker-compose. With /usr/lib/systemd/systemd as my Docker CMD, the env vars get “lost”. If I try a wrapper script around systemd, it the env vars can be seen, but, starting systemd from a shell script - doesn’t work.
Might there be some way of passing env vars into a systemd container? Or some other way of getting the equivalent information into the container before systemd is started? I see that, with linked containers, the /etc/hosts system name - ip address mappings are there in a systemd container. So, the basic idea is possible.
Thanks for any ideas.