I have troubles finding a way to share my local SSH keys to the pgadmin4 docker container.
Here is how I proceed, by mounting my ~/.ssh folder into the container:
version: '3.8'
services:
pgadmin4:
image: dpage/pgadmin4:5.5
environment:
- PGADMIN_DEFAULT_EMAIL=email@domain.org
- PGADMIN_DEFAULT_PASSWORD=********
- PGADMIN_LISTEN_PORT=5050
volumes:
- pgadmin-data:/var/lib/pgadmin
- ~/.ssh:/var/lib/pgadmin/storage/postgres_local.host/.ssh
restart: unless-stopped
volumes:
pgadmin-data: {}
Then, when setting up a connection, in the "SSH Tunnel" tab, I click the three little dots in front of the "Identify file" option:
But then, when browsing for an SSH key file, that bind folder has a small "lock" icon attached to it, and indeed, I got a "Permission denied" error when I try to open it:
Hence my question: what's the best and most convenient way to safely share some SSH identity files with that container?
Is it a good idea to do so?
Please note that they are obviously chmoded 600 on my local machine.

