Add description for docker detahced (#28799)

* Add description for docker detahced

I added how to run in detached mode, see the container running and get info and how to attach to container.

* Fix typo in docker detached part
This commit is contained in:
Kingsjo1
2019-03-07 22:05:01 -05:00
committed by Randell Dawson
parent e6262284b4
commit b2375a9235

View File

@ -188,6 +188,25 @@ CMD ["npm", "start"]
``` ```
### Docker detached
Docker detached is where you can run a docker container in the background. If you run a docker container in detached mode you can later view the logs and attach to it and run input and recieve output.
```
To run docker detached
docker run -d IMAGE
To see running docker container
docker ps -a
To attach to docker container
docker attach CONTAINER ID
```
#### More Information: #### More Information:
- [Beginner friendly doc](https://medium.freecodecamp.org/a-beginner-friendly-introduction-to-containers-vms-and-docker-79a9e3e119b) - [Beginner friendly doc](https://medium.freecodecamp.org/a-beginner-friendly-introduction-to-containers-vms-and-docker-79a9e3e119b)