title: Shell into swarm container
body: <p>I'm unable to connect to a container that's running on a swarm. Seems like the following doesn't work:</p>
  
  <pre><code>docker exec -it &lt;container_ID&gt; bash
  </code></pre>
  
  <p>Here is some output:</p>
  
  <pre><code>&gt;$ docker service ls
  ID            NAME          REPLICAS  IMAGE                              COMMAND
  4rliefwe74o5  login         1/1       login-arm64:1.0
  
  
  &gt;$ docker service ps login
  ID                         NAME     IMAGE                       NODE               DESIRED STATE  CURRENT STATE          ERROR
  2jk3s2xs7ce62piunbkiptypz  login.1  login-arm64:1.0  odroid64-cluster4  Running        Running 5 minutes ago
  </code></pre>
  
  <p>Then I'll run:</p>
  
  <pre><code>$ docker exec -it 2jk3s2xs7ce62piunbkiptypz bash
  </code></pre>
  
  <p>or </p>
  
  <pre><code>$ docker exec -it login.1 bash
  </code></pre>
  
  <p>and see the following errors</p>
  
  <blockquote>
    <p>Error response from daemon: No such container: 2jk3s2xs7ce62piunbkiptypz</p>
  </blockquote>
  
  
  
  <blockquote>
    <p>Error response from daemon: No such container: login.1</p>
  </blockquote>