Answers: <p>No, it uses an internal <a href="https://docs.docker.com/engine/api/v1.24/" rel="noreferrer">"attach protocol"</a> via the Docker daemon.</p>
  
Answers: CC BY-SA 3.0
Answers: 2017-08-21T11:30:31.523Z
Answers: 2017-08-21T11:30:31.523Z
Answers: Gaius
Body: <p>If I run </p>
  
  <pre><code>docker run -it ubuntu bash
  </code></pre>
  
  <p>Does it actually SSH into the container, or does it use another protocol?</p>
  
Comments: CC BY-SA 3.0
Comments: 2017-08-21T11:24:44.657Z
Comments: No, there is no SSH involved. Docker uses a technology called namespaces to provide the isolated workspace called the container. https://docs.docker.com/engine/docker-overview/#namespaces
Comments: oryades
Comments: CC BY-SA 3.0
Comments: 2017-08-21T13:45:14.807Z
Comments: @oryades you should think about turning this comment in an answer IMHO.
Comments: Tensibai
Comments: CC BY-SA 3.0
Comments: 2017-08-21T15:38:37.227Z
Comments: As a side note in most cases you want to `docker run -it --rm ubuntu su -` rather than running bash. Running `su - ` simulates a full login and as a result, initialises some environment variables such as `TERM`.
Comments: Michaël Le Barbier
Tags: <docker><containers>
Title: Does "docker run" actually SSH into the container?
UserDisplayName: Buvanesh Kumar
ThreadText: # Does "docker run" actually SSH into the container?
  
  (Asked by: username_0 on 2017-08-21)
  
  If I run
  
  ```
  docker run -it ubuntu bash
  
  ```
  
  Does it actually SSH into the container, or does it use another protocol?
  
  **Tags:** docker, containers
  
  > **Comments:**
  > **username_1**: No, there is no SSH involved. Docker uses a technology called namespaces to provide the isolated workspace called the container. https://docs.docker.com/engine/docker-overview/#namespaces  
  > **username_2**: @username_1 you should think about turning this comment in an answer IMHO.  
  > **username_3**: As a side note in most cases you want to `docker run -it --rm ubuntu su -` rather than running bash. Running `su - ` simulates a full login and as a result, initialises some environment variables such as `TERM`.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_4 on 2017-08-21. Score: 13 | Accepted answer
  
  No, it uses an internal ["attach protocol"](https://docs.docker.com/engine/api/v1.24/) via the Docker daemon.
  
  
  ---
  
  