Skip to content

Instantly share code, notes, and snippets.

@alexishida
Last active February 8, 2018 00:50
Show Gist options
  • Select an option

  • Save alexishida/970fb72dbc5fd1906bbdc2b9576c98f4 to your computer and use it in GitHub Desktop.

Select an option

Save alexishida/970fb72dbc5fd1906bbdc2b9576c98f4 to your computer and use it in GitHub Desktop.
Docker postgres and pgadmin4
docker run -d \
--name=postgres \
--restart=always \
-p 5432:5432 \
-v /etc/localtime:/etc/localtime:ro \
-e POSTGRES_USER=user \
-e POSTGRES_PASSWORD=mysecretpassword \
-v /storage/postgres:/var/lib/postgresql/data \
postgres:latest
docker run -d \
--name=pgadmin4 \
--restart=always \
-p 8080:80 \
-v /etc/localtime:/etc/localtime:ro \
--link postgres:db \
-e "[email protected]" \
-e "PGADMIN_DEFAULT_PASSWORD=admin" \
dpage/pgadmin4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment