Last active
February 8, 2018 00:50
-
-
Save alexishida/970fb72dbc5fd1906bbdc2b9576c98f4 to your computer and use it in GitHub Desktop.
Docker postgres and pgadmin4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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