Closed overton660 closed 4 years ago
Hi, have you tried setting DOCKER_OPTS environment variable in your build settings, in the Parameters section of the build configuration?
I have not, I will try that and get back
I am not sure if I have the correct syntax, but what I have now is not working.
Is this how to set the variable properly?
Hi, you should add not "Docker Opts" variable in TeamCity UI, but DOCKER_OPTS, so the name would be env.DOCKER_OPTS
and the value --incesure-registry...
Hope this helps,
Gotcha, I will give that a shot just to see if it works, but I did end up resolving the issue by setting up a revers proxy server to handle the https
I am trying to run a docker build in an agent within the container. The docker file of my project pulls from an insecure docker registry. I have tried setting the insecure registry in the docker_opts environment variable, but am still getting the error. Hoping someone can guide me in the right direction
Here is my docker run command.
docker run -it -e SERVER_URL="http://buildtest:880" --privileged -e DOCKER_OPTS="--insecure-registry 10.0.4.89:2113" -e DOCKER_IN_DOCKER=start -e AGENT_NAME="Docker-TeamCity" -v :/data/teamcity_agent/conf jetbrains/teamcity-agent
The agent starts and connects to our agent perfectly, but I get the classic insecure registry error 'http response to an https client' I have execed into the machine and dont see a daemon.json file. Not sure if I should just mount the file, or if that would even work. Any help is appreciated.