Re: BUG #17436: Initializing and starting with Dockerfile fails - Mailing list pgsql-bugs

From Julien Rouhaud
Subject Re: BUG #17436: Initializing and starting with Dockerfile fails
Date
Msg-id 20220313025346.obdsdilb4eygjlft@jrouhaud
Whole thread Raw
In response to Re: BUG #17436: Initializing and starting with Dockerfile fails  ("David G. Johnston" <david.g.johnston@gmail.com>)
List pgsql-bugs
On Sat, Mar 12, 2022 at 07:24:26PM -0700, David G. Johnston wrote:
>
> Though I am curious that initdb didn't fail during the build since it
> doesn't seem like either -D or PGDATA have been set and one of those is
> required.  I suppose it ended up using an unexpected location that didn't
> match up with the -D option to pg_ctl.

If you look a few lines above the link I sent you can see the PGDATA env being
set to the same location.  The problem is only that this location is a volume.

> It is indeed possible to do what you are trying - to bake in an active
> database into the docker image, and not rely on a separate mounted volume
> for the database.  But that also isn't really how the existing image is
> setup to be used and so you will need to figure out the customizations
> needed to make it do what you want

Also using the container layer to write data will perform ridiculously bad.  If
the goal is only to read the data that might be ok, but maybe not.  I think the
OP should better ask on Docker specific lists for guidance.



pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: BUG #17436: Initializing and starting with Dockerfile fails
Next
From: PG Bug reporting form
Date:
Subject: BUG #17437: time spent in JIT is also attributed to function scan