Docker version 1.12.0, build 8eab29e (on RHEL 7.2)
My Dockerfile looks like this:
COPY ./configureservice.sh /tmp
ENTRYPOINT [ “/usr/sbin/init” ]
Inside, configureservice.sh, I am editing /etc/systemd/system.conf (and /etc/systemd/system.conf.d/system.conf) and setting certain environment variables (using DefaultEnvironment=VAR=value syntax). But these environments are not getting passed to /usr/sbin/init (process 1) although they are available for other processes (like journald). I also tried setting these in various other files in different formats but nothing works.
What am I missing ? How can I pass environment to /usr/sbin/init without using ENV option of Dockerfile or -e option of run command ?