Skip to content

Address breakages from recent PostgreSQL update#17

Merged
jasonmp85 merged 3 commits intodevelopfrom
link_workerlist_file_as_root
Feb 10, 2017
Merged

Address breakages from recent PostgreSQL update#17
jasonmp85 merged 3 commits intodevelopfrom
link_workerlist_file_as_root

Conversation

@jasonmp85
Copy link
Copy Markdown
Contributor

The root cause this is docker-library/postgres#253, after which the postgres Docker image no longer runs startup scripts as root. Because we use a shared volume and need to change its permissions (and we expect to run chown, etc., as root), that change broke our image. We'll eventually move entirely away from this volume approach, but for now this should fix things.

The docker-entrypoint script is fairly arcane, but invoking it with exec and $@ seems like the most foolproof way to have it behave like before. In addition, we have to now split up the creation of the worker file (and permissions changes) and its symlinking (which must be done as the owner of the database). Finally, since we override ENTRYPOINT, we need to ensure to provide a similar default for CMD so the image can be started without any arguments, but they can be provided if so desired (to set PostgreSQL configuration).

Burak Yucesoy and others added 3 commits February 10, 2017 13:59
Normally PostgreSQL's ENTRYPOINT script runs our scripts with root user but they changed
this behaviour, now PostgreSQL's ENTRYPOINT script runs scripts with postgres user. With
this change we redefined ENTRYPOINT so that we can run our scripts as root again.
The docker-entrypoint script is fairly arcane, but invoking it with
exec and $@ seems like the most foolproof way to have it behave like
before. In addition, we have to now split up the creation of the worker
file (and permissions changes) and its symlinking (which must be done
as the owner of the database). Finally, since we override ENTRYPOINT,
we need to ensure to provide a similar default for CMD so the image
can be started without any arguments, but they can be provided if
so desired (to set PostgreSQL configuration).
@jasonmp85 jasonmp85 merged commit fe2e4f5 into develop Feb 10, 2017
@jasonmp85 jasonmp85 deleted the link_workerlist_file_as_root branch February 10, 2017 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant