add volume to example app config, add module 9
This commit is contained in:
@ -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
|
||||||
|
|||||||
@ -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:
|
||||||
35
09-interacting-with-containers/README.md
Normal file
35
09-interacting-with-containers/README.md
Normal 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
|
||||||
Reference in New Issue
Block a user