title: Teamcity Build won't run until Build Agents is configured with Docker?
body: <p>I created a new build for my Teamcity pipeline. For the first time I use then Docker buildstep. After I setup everything I realized the build agent does not seem to be ready for it.</p>
  
  <p><a href="https://i.stack.imgur.com/IfriY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IfriY.png" alt="enter image description here"></a></p>
  
  <p>I understand that my agent does not seem to be ready for building with docker <strong>but</strong> nobody is actually telling me how you can do that. I read the official guides but no word about how to actually install docker into my agent (if that's the way to solve the problem).</p>
  
  <p>Can someone tell me what I have to do to get it to work?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>@Senior Pomidor helped me to get one step closer. I added his first example to the docker run command</p>
  
  <pre><code>docker run -it -e SERVER_URL="&lt;url to TeamCity server&gt;"  \
      --privileged -e DOCKER_IN_DOCKER=start \    
      jetbrains/teamcity-agent 
  </code></pre>
  
  <p>After doing so I got rid of the mentioned messages in the screenshot. My Agents configuration now has the following:</p>
  
  <pre><code>docker.server.osType     linux
  docker.server.version    18.06.1
  docker.version   18.06.1
  </code></pre>
  
  <p><strong>But</strong> still Teamcity is complaining with this message:</p>
  
  <p><a href="https://i.stack.imgur.com/iFN9k.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iFN9k.png" alt="enter image description here"></a></p>
  
  <p>Which kinda leaves me clueless again.</p>
  
  <p><strong>Final Solution</strong>:
  The upcoming EDIT2 issue could be resolved by just restarting the teamcity server instance. The agent was actually able to run the build but teamcity was not able to realise that without a reboot.</p>
  
  <p><strong>EDIT2</strong></p>
  
  <p>Request Information:</p>
  
  <p>My CI Server OS:</p>
  
  <pre><code>PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
  NAME="Debian GNU/Linux"
  VERSION_ID="9"
  VERSION="9 (stretch)"
  </code></pre>
  
  <p>Running Container:</p>
  
  <pre><code>CONTAINER ID        IMAGE                       COMMAND              CREATED             STATUS              PORTS                  NAMES
  0f8e0b04d6a6        jetbrains/teamcity-agent    "/run-services.sh"   19 hours ago        Up 19 hours         9090/tcp               teamcity-agent
  20964c22b2d9        jetbrains/teamcity-server   "/run-services.sh"   37 hours ago        Up 37 hours         0.0.0.0:80-&gt;8111/tcp   teamcity-server-instance
  </code></pre>
  
  <p>Container run by:</p>
  
  <pre><code>## Server
  docker run -dit --name teamcity-server-instance  -v /data/teamcity:/data/teamcity_server/datadir -v /var/log/teamcity:/opt/teamcity/logs  -p 80:8111 jetbrains/teamcity-server
  
  ## Agent
  docker run -itd --name teamcity-agent -e SERVER_URL="XXX.XXX.XXX.XXX:80"  --privileged -e DOCKER_IN_DOCKER=start -v /etc/teamcity/agent/conf:/data/teamcity_agent/conf jetbrains/teamcity-agent
  
  </code></pre>
  
  <p>Build Step Information:</p>
  
  <p><a href="https://i.stack.imgur.com/2zN8N.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2zN8N.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/TIkHE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TIkHE.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/NHxqd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NHxqd.png" alt="enter image description here"></a></p>