Created
March 10, 2023 16:24
-
-
Save pdkovacs/a0988f6659454534e234fd1df50fa5dd to your computer and use it in GitHub Desktop.
Start pgadmin4 in docker container
This file contains 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
#!/bin/bash | |
# https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html | |
container_name=pg-admin | |
email=admin@otter.com | |
password=password | |
if docker ps -a | grep $container_name; | |
then | |
docker start $container_name | |
else | |
docker pull dpage/pgadmin4 | |
docker run --name $container_name \ | |
-p 9991:80 \ | |
-e "PGADMIN_LISTEN_ADDRESS=0.0.0.0" \ | |
-e "PGADMIN_DEFAULT_EMAIL=$email" \ | |
-e "PGADMIN_DEFAULT_PASSWORD=$password" \ | |
-d dpage/pgadmin4 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment