passwd0/run
2018-09-09 21:43:11 -07:00

16 lines
476 B
Bash
Executable File

#!/usr/bin/env bash
docker stop passwd0
docker rm passwd0
docker stop passwd-db
docker rm passwd-db
docker network create web
docker network create passwd-db
docker build -t passwd0 .
docker run -d --restart always --name passwd-db --network passwd-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 passwd0 --network passwd-db \
passwd0:latest
docker network connect web passwd0