summaryrefslogtreecommitdiff
path: root/docker_cheat_sheet.md
diff options
context:
space:
mode:
Diffstat (limited to 'docker_cheat_sheet.md')
-rw-r--r--docker_cheat_sheet.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/docker_cheat_sheet.md b/docker_cheat_sheet.md
index f1d3518..621f9d9 100644
--- a/docker_cheat_sheet.md
+++ b/docker_cheat_sheet.md
@@ -95,7 +95,7 @@
### Running a container
-```
+```sh
# pull and run an nginx server
# `--publish 80:80` maps the host port to the container listening port
# `--name webserver` container local name
@@ -121,7 +121,7 @@ FROM nginx:alpine
COPY . /usr/share/nginx/html
```
-```
+```sh
# build
docker build -t webserver-image:v1 .
@@ -154,7 +154,7 @@ ENTRYPOINT ["node", "./app.js"]
### Mapping a Volume
-```
+```sh
# create a volume
docker volume create myvol
@@ -171,7 +171,7 @@ docker run -d --name devtest -v myvol:/app nginx:latest
#### Mapping to a local folder
-```
+```sh
# run a container with a volume
# `d:/test` specify a folder
docker run -d --name devtest -v d:/test:/app nginx:latest
@@ -218,7 +218,7 @@ services:
### Docker Compose Example
-```
+```sh
# build the service
docker compose build