docker-library / postgres

Docker Official Image packaging for Postgres
http://www.postgresql.org
MIT License
2.16k stars 1.13k forks source link

Question about stable decission for entrypoint filename #1116

Closed Gruummy closed 1 year ago

Gruummy commented 1 year ago

Hi community,

for the reason about a concept planning on my side (for the project in my company where i work in) i would have a theoretically really easy to answer .... but important question:

Can we as community trust on the situation that the entrypoint scipt of running postgres ... in dockerized worlds ... will stay to be "/docker-entrypoint.sh" ?

I ask for multiple reasons. 2 of them have the following background:

I have a few years experiance with postgres ... so no fear that the do not understand the complexitiy of this RDBMS and such questions. But we create concepts which should work for years ... in our company .. so this question is a very important one ... to ensure that not "surprisingly" the world changes over night.

It would be great if a reliable answer could be given.

... please excuse typos ... wrong ordering of words ... and so on. My native language is german and i am to lazy to put everything before ... what is going through my mind .... to google translator.

yosifkit commented 1 year ago

We have no plans to change the name of the file; the filename will stay docker-entrypoint.sh. It is at /usr/local/bin/docker-entrypoint.sh within the images.

It has not been available at / in the image since before PostgreSQL 11. I don't foresee us moving it away from /usr/local/bin but if we did, it would still be findable in the PATH. https://github.com/docker-library/postgres/pull/260 is where it was added to PATH instead of /, but with a symlink at /. Our template used to make the symlink to / for versions less than 11, but it was no longer being used since those versions have reached end of life:

{{ if .major >= 11 then "" else ( -}}
RUN ln -s usr/local/bin/docker-entrypoint.sh / # backwards compat
{{ ) end -}}
Gruummy commented 1 year ago

This is a really good and reliable answer. In special also about the mentioned backward compatibility. I think this issue can be closed. Thanks you very much.