docker_run
This is an old revision of the document!
Docker Run Command
| Flag | Explanation |
|---|---|
| -i | Interactive Container |
| -t | creates a pseudo-TTY that attaches stdin and stdout |
| –rm | Remove the container after the command/script has finished |
| -v | adds a volume to the container |
| -d | tells Docker to run the container in the background |
| -P | |
| -p | e.g. -p 80:5000 binds the container to a specific port. This would map port 5000 inside our container to port 80 on our local host |
| -h |
docker run -it -v /home/luke/documents:/location/on/container imageID
docker_run.1444141265.txt.gz · Last modified: 2024/05/23 07:26 (external edit)
