Any way to introspect the docker image? #2381
-
Hi, We are facing the issue described in #1857 with the patch Postgres 11.16 & PostgREST 6.0.2. Our image was previously the following:
But upon upgrading to 9.0.1.20220717, we can no longer access the root user, and we are not able to login the image using What user should we be using to carry out our Dockerfile extensions / Is there any way we can log in the container to investigate? Thanks a lot, |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Hi. The Docker image for v9^ is very minimal, it doesn't have a shell and only runs the There was a similar question before (for kubernetes though) that may help you too: #2243 (comment) |
Beta Was this translation helpful? Give feedback.
-
Hi @laurenceisla ! We are already using docker-compose - the goal of the extension is to ensure a fully ready postgres db is available before postgrest gets started. Back when we designed this image, the wait-for-it shell script approach was the official docker-compose way to wait for another container to initialize. We need to run some migrations against our db before we can allow postgrest to access it. Otherwise it gets an imprint of a schema that's outdated and we have to kill it and reboot it to reload the schema once the migrations have finished applying. Given that it's no longer possible to use this previously-official way of waiting on the db to be ready, how would you approach doing so? Thanks! |
Beta Was this translation helpful? Give feedback.
-
If you want to use PostgREST in a "full" docker image, you can do the following: # derive from any base image you want
FROM alpine:latest
# copy PostgREST over
COPY --from=postgrest/postgrest:v9.0.1.20220717 /bin/postgrest /bin
# add your other stuff |
Beta Was this translation helpful? Give feedback.
-
@wolfgangwalther Thanks for the two great answers! These will definitely be invaluable for us to cover our use case. I like the NOTIFY approach and I'll see what we can do with it :) |
Beta Was this translation helpful? Give feedback.
If you want to use PostgREST in a "full" docker image, you can do the following: