Mmm let me see.. did you have a look at the EnvironmentFile directive for systemd units?
I remember I did something like this to configure Samba persistent mounts while having passwords in a file with read-access only for the root user.
You could extract Docker proxy settings variables in a file such as /etc/docker/docker-proxy.env and then use the following directive in your unit file:
Mmm let me see.. did you have a look at the
EnvironmentFiledirective for systemd units?I remember I did something like this to configure Samba persistent mounts while having passwords in a file with read-access only for the root user.
You could extract Docker proxy settings variables in a file such as
/etc/docker/docker-proxy.envand then use the following directive in your unit file:This article might also help you unix.stackexchange.com/questions/4...
Remember to lock down your environment file afterwards with
chmod 400 /etc/docker/docker-proxy.envI don't have an environment to test this out at the moment, let me know if this works!