# Filter docker image running with port 5432 to get IP to use for Pgadmin connexion
# Get the key of the inspected network (one in our case) from this image using docker inspect
# Provide the key to access to the IP of the docker container with DB
# Copy/paste to use in PgAdmin (PS: we use a local docker running with postgres user but passwordless)
key=`docker inspect $(docker-compose ps |grep 5432 |cut -d ' ' -f1) |jq '.[].NetworkSettings.Networks|keys[]'` \
docker inspect $(docker-compose ps |grep 5432 |cut -d ' ' -f1) |jq -r .[].NetworkSettings.Networks.${key}.IPAddress
Created
September 26, 2019 21:25
-
-
Save ThomasG77/bd2c1ae9930923f76aa06a4c1b05988d to your computer and use it in GitHub Desktop.
Docker/Docker-compose recipes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment