16 lines
428 B
Bash
Executable File
16 lines
428 B
Bash
Executable File
#!/usr/bin/env bash
|
|
docker stop dt0
|
|
docker rm dt0
|
|
docker stop dt-db
|
|
docker rm dt-db
|
|
docker network create web
|
|
docker network create dt-db
|
|
|
|
docker build -t dt0 .
|
|
docker run -d --restart always --name dt-db --network dt-db \
|
|
-v "$PWD/db":/var/lib/postgresql/data postgres:10.5-alpine
|
|
sleep 5 # give Postgres time to start
|
|
docker run -d --restart always --name dt0 --network dt-db \
|
|
dt0:latest
|
|
docker network connect web dt0
|