Running TeamCity agents in docker container and pushing docker images to AWS ECR
I have got a TeamCity running on a EC2 stack. 1 server and 3 agents. I have got a build config that builds a docker image and pushes it into a AWS ECR. I am able to do that from the host EC2 server, but not from the agent. I would like to avoid doing manual installation and configuration in the container as I would like to be able to upgrade easily without having to reconfigure things again.
So, is running agent on host to support building and pushing docker images to AWS ECR the only option?
Please sign in to leave a comment.
Ok, found the solution. In, TeamCity project configuration, add ECR connection. Then, in the build configuration, add build feature, add "Docker Support". Make sure the choice "Log in to the Docker registry before the build" is checked and you choose the ECR connection from the project configuration. Thats it.