From: Julien Rouhaud <rjuju123@gmail.com>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: dkeate@gmail.com, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #17436: Initializing and starting with Dockerfile fails
Date: Sun, 13 Mar 2022 10:53:46 +0800
Message-ID: <20220313025346.obdsdilb4eygjlft@jrouhaud> (raw)
In-Reply-To: <CAKFQuwa=O1hN5eeJmKUbKpa2nhQXQTn-w3BdzD67-YB4MQJcdg@mail.gmail.com>
References: <17436-b8a4a3dd58c54838@postgresql.org>
<CAKFQuwa=O1hN5eeJmKUbKpa2nhQXQTn-w3BdzD67-YB4MQJcdg@mail.gmail.com>
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.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: rjuju123@gmail.com, david.g.johnston@gmail.com
Subject: Re: BUG #17436: Initializing and starting with Dockerfile fails
In-Reply-To: <20220313025346.obdsdilb4eygjlft@jrouhaud>
References: <17436-b8a4a3dd58c54838@postgresql.org> <CAKFQuwa=O1hN5eeJmKUbKpa2nhQXQTn-w3BdzD67-YB4MQJcdg@mail.gmail.com> <20220313025346.obdsdilb4eygjlft@jrouhaud>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox