Thread: PassFile in docker compose?
I'm trying to use docker compose to spin up postgres and pgAdmin services, and the only sticking point is a minor one: I can't seem to get the PassFile to work.
I wonder if it's not possible because of the following note at the bottom this page of the pgAdmin docs https://www.pgadmin.org/docs/pgadmin4/4.23/server_dialog.html:
```
I wonder if it's not possible because of the following note at the bottom this page of the pgAdmin docs https://www.pgadmin.org/docs/pgadmin4/4.23/server_dialog.html:
```
Note
The password file option is only supported when pgAdmin is using libpq v10.0 or later to connect to the server.
```
Tried:
- stackoverflowing
- most promising google result: https://javaoraclesoa.blogspot.com/2020/01/pgadmin-in-docker-provisioning.html
Nothing seemed to work. Am I missing something? Or is it really just not possible?
Thanks!
Z
Nothing seemed to work. Am I missing something? Or is it really just not possible?
Thanks!
Z
Hi
On Thu, Jul 23, 2020 at 12:57 AM Zoltan Albert <znalbert@gmail.com> wrote:
I'm trying to use docker compose to spin up postgres and pgAdmin services, and the only sticking point is a minor one: I can't seem to get the PassFile to work.
I wonder if it's not possible because of the following note at the bottom this page of the pgAdmin docs https://www.pgadmin.org/docs/pgadmin4/4.23/server_dialog.html:
```Note
The password file option is only supported when pgAdmin is using libpq v10.0 or later to connect to the server.
```
That won't be an issue if you're using dpage/pgadmin4 (or any of the installers/packages built by the pgAdmin team).
My guess would be that you've not got the permissions or ownership of the pgpassfile correct so libpq is just ignoring it. It needs to be mode 0600 and owned by 5050:5050.
I have no idea how you make that happen in Docker Compose though.
Tried:- stackoverflowing- most promising google result: https://javaoraclesoa.blogspot.com/2020/01/pgadmin-in-docker-provisioning.html
Nothing seemed to work. Am I missing something? Or is it really just not possible?
Thanks!
Z
On Thu, Jul 23, 2020 at 9:59 AM Dave Page <dpage@pgadmin.org> wrote:
HiOn Thu, Jul 23, 2020 at 12:57 AM Zoltan Albert <znalbert@gmail.com> wrote:I'm trying to use docker compose to spin up postgres and pgAdmin services, and the only sticking point is a minor one: I can't seem to get the PassFile to work.
I wonder if it's not possible because of the following note at the bottom this page of the pgAdmin docs https://www.pgadmin.org/docs/pgadmin4/4.23/server_dialog.html:
```Note
The password file option is only supported when pgAdmin is using libpq v10.0 or later to connect to the server.
```That won't be an issue if you're using dpage/pgadmin4 (or any of the installers/packages built by the pgAdmin team).My guess would be that you've not got the permissions or ownership of the pgpassfile correct so libpq is just ignoring it. It needs to be mode 0600 and owned by 5050:5050.I have no idea how you make that happen in Docker Compose though.
It turns out that others have got this to work though - you can find an example here: https://github.com/asaikali/docker-compose-postgres
Thanks! I appreciate it!
On Mon, Aug 3, 2020 at 4:10 AM Dave Page <dpage@pgadmin.org> wrote:
--On Thu, Jul 23, 2020 at 9:59 AM Dave Page <dpage@pgadmin.org> wrote:HiOn Thu, Jul 23, 2020 at 12:57 AM Zoltan Albert <znalbert@gmail.com> wrote:I'm trying to use docker compose to spin up postgres and pgAdmin services, and the only sticking point is a minor one: I can't seem to get the PassFile to work.
I wonder if it's not possible because of the following note at the bottom this page of the pgAdmin docs https://www.pgadmin.org/docs/pgadmin4/4.23/server_dialog.html:
```Note
The password file option is only supported when pgAdmin is using libpq v10.0 or later to connect to the server.
```That won't be an issue if you're using dpage/pgadmin4 (or any of the installers/packages built by the pgAdmin team).My guess would be that you've not got the permissions or ownership of the pgpassfile correct so libpq is just ignoring it. It needs to be mode 0600 and owned by 5050:5050.I have no idea how you make that happen in Docker Compose though.It turns out that others have got this to work though - you can find an example here: https://github.com/asaikali/docker-compose-postgres