monban / container-demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

container-demo

Build a docker image

docker 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}}

About

License:MIT License


Languages

Language:Go 44.8%Language:HTML 24.0%Language:Dockerfile 15.8%Language:CSS 10.3%Language:Shell 5.1%