I have some proxy settings defined in the /etc/environment files of my Docker images which constitute my Jenkins agents. These images are correctly spun up and Jenkins happily builds within them, with one issue: the variables from /etc/environment aren't present in the agent environment.
When I run "docker run -it myimage /bin/bash" I can see the variables set correctly.
When I run "env" within a Jenkins build, they are not.
I understand that Jenkins launches non-interactive shells, but these should still read /etc/environment, I believe.
What is the best way to get Jenkins agents to respect environment variables from the system? Is there a better option than /etc/environment?