Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/monban/container-demo
https://github.com/monban/container-demo
Last synced: 30 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/monban/container-demo
- Owner: monban
- License: mit
- Created: 2019-06-11T03:46:20.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-06-11T04:50:21.000Z (over 5 years ago)
- Last Synced: 2023-08-01T14:26:02.842Z (over 1 year ago)
- Language: Go
- Size: 6.97 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# container-demo
Build a docker imagedocker build -t {{image-name}} .
Run a simple container in the background
docker run -d {{image-name}}
Stop and remove a running container
docker rm -f {{container name or id}}
Create a new running container and forward a port
docker run -d -p {{host-port}}:{{container-port}} {{image-name}}
Create a new running container mounting a local directory as a volume
docker run -d -v {{directory}}:{{volume}} {{image-name}}