add volume to example app config, add module 9

This commit is contained in:
sid palas
2023-01-30 19:37:44 -05:00
parent 2e4b6e938e
commit 15a831b04b
3 changed files with 40 additions and 0 deletions

View File

@ -43,6 +43,7 @@ docker-run-all:
docker run -d \ docker run -d \
--name db \ --name db \
-e POSTGRES_PASSWORD=foobarbaz \ -e POSTGRES_PASSWORD=foobarbaz \
-v pgdata:/var/lib/postgresql/data \
-p 5432:5432 \ -p 5432:5432 \
--restart unless-stopped \ --restart unless-stopped \
postgres:15.1-alpine postgres:15.1-alpine

View File

@ -42,7 +42,11 @@ services:
restart: unless-stopped restart: unless-stopped
db: db:
image: postgres:15.1-alpine image: postgres:15.1-alpine
volumes:
- pgdata:/var/lib/postgresql/data
environment: environment:
- POSTGRES_PASSWORD=foobarbaz - POSTGRES_PASSWORD=foobarbaz
ports: ports:
- 5432:5432 - 5432:5432
volumes:
pgdata:

View File

@ -0,0 +1,35 @@
# Interacting with Containers and Other Docker Objects
## Images
1) ls
2) build
3) tag
4) pull
5) push
6) rm
7) prune
8) save
## Containers
1) ls
2) run
3) start
4) attach
5) exec
6) logs
7) top
8) cp
9) stop
10) kill
11) prune
12) export
## Volumes
1) ls
2) create
3) inspect
4) rm
5) prune