docker run

main
Tran Hau 2020-03-31 16:26:22 +07:00
parent 91de458805
commit 32a15401a0
1 changed files with 17 additions and 0 deletions

View File

@ -23,3 +23,20 @@ Delete all images, containers, volumes, and networks that are not associated wit
```sh
docker system prune
```
Read [docker run](https://docs.docker.com/engine/reference/commandline/run/).
| option | example | explain |
| -------- | --------------- | ----------------------------------------- |
| `-i` | | Keep STDIN open even if not attached |
| `--name` | | |
| `-p` | `-p 8080:80` | Publish container port : host port |
| `--rm` | | |
| `-t` | | Allocate a pseudo-TTY |
| `-v` | `-v ~/abc:/abc` | Bind host directory : container directory |
Run `ubuntu` image:
```sh
docker run --rm -it ubuntu
```