summaryrefslogtreecommitdiff
path: root/docker_cheat_sheet.md
diff options
context:
space:
mode:
authorLouie S <louie@example.com>2023-12-29 15:45:39 -0500
committerLouie S <louie@example.com>2023-12-29 15:45:39 -0500
commitb75ce875030134d21d2ede398457b7c1910b11bf (patch)
treebbdddae5548ae9e4b677b513fa4653446730c9ce /docker_cheat_sheet.md
parentb1477105319de37088743c4c3ffae7c871189864 (diff)
Watched through ch. 9
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