I tried to do what is mentioned in: Multiple Docker containers, same image, different config
I did:
docker run --name DockerAgent1 <same image id>
docker run --name DockerAgent2 <same image id>
docker run --name DockerAgent3 <same image id>
But then I get the error:
Agent id=<unknown>. Another agent with name "DockerAgent"(id=173) is registered on the server. Please check you do not have two agents with the same name.
In teamcity I only see DockerAgent under unauthorized.
Also in my dockerfile I have also
ENV AGENT_NAME DockerAgent1
When I remove that from my dockerfile the name of the teamcityagent is ip_[number]
How can I register multiple agents in teamcity, that are using the same image in docker, while each has a different teamcity-agent name.