I'm setting up TeamCity server and agents. The agents are running in docker containers (windows server core), and I define various environment variables to be set on the agent containers, which ultimately get set as Windows env vars. Some are passed in via the docker-compose, others are set in my agent Dockerfile when building the image, using RUN SETX /M NAME VALUE. When I open a console on the agent and type SET in cmd I can see them.
However when I look at the agents in the TeamCity server portal, and look in their Agent Parameters -> Environment Variables - I don't see any of the OS environment variables I defined. It looks like the PATH variable is passed in, but not any others.
How do I pass in specific environment variables to my agent build configurations?