nearcatch Posted July 31, 2021 Share Posted July 31, 2021 (edited) I'm trying to set up a registry proxy for the docker daemon. According to the instructions here, it is normally set using a systemd file. I have found that in unraid, simply setting the environment variables in a shell window and then using '/etc/rc.d/rc.docker restart' will properly get docker using the registry proxy. My question is: How can I set the environment variables globally on boot so that the docker daemon recognizes them upon startup? Setting the variables in my go file or in profile.sh does not work. After a reboot, the variable is set (from profile.sh only), but docker doesn't use it until I manually restart it from the command line. EDIT: For anyone else who ever wants to do this, I figured it out. There's a file on the flash drive at /boot/config/docker.cfg. Add the below lines to that file and your docker daemon will use a proxy. export HTTP_PROXY="http://proxy.example.com" export HTTPS_PROXY="https://proxy.example.com" Edited August 21, 2021 by hasown Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.