Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ES image): Allow running Elasticsearch 5 container as any user #62

Merged
merged 1 commit into from
Jan 17, 2019

Conversation

orangejulius
Copy link
Member

This sets some more permissive permissions on various directories,
files, and executables used in the Elasticsearch 5 docker image.

It allows the user the container processes run under to be changed from
the default of 1000, which helps keep things consistent with the rest of
the Pelias containers.

Fixes #46

orangejulius added a commit that referenced this pull request Jan 16, 2019
In #55 we added a `chown` line that
attempts to set proper permissions on the Elasticsearch data directory.

`chown` can generally only be run as root, so this PR adds handling for
the common case where `chown` fails.

In general, either the pelias CLI is run as root, and the `chown` will
succeed, or the CLI is run as the same user the Docker container
processes will run as. In this case the `mkdir` on the preceeding line
will set up the directory with proper ownership.

We can't really do anything in an automated way to handle people running
the Pelias CLI as a different, non-root, user than the one they want the
containers to run with, so I think this is the best we can do.

This will be even more useful once #62 is merged.
orangejulius added a commit that referenced this pull request Jan 16, 2019
In #55 we added a `chown` line that
attempts to set proper permissions on the Elasticsearch data directory.

`chown` can generally only be run as root, so this PR adds handling for
the common case where `chown` fails.

In general, either the pelias CLI is run as root, and the `chown` will
succeed, or the CLI is run as the same user the Docker container
processes will run as. In this case the `mkdir` on the preceding line
will set up the directory with proper ownership.

We can't really do anything in an automated way to handle people running
the Pelias CLI as a different, non-root, user than the one they want the
containers to run with, so I think this is the best we can do.

This will be even more useful once #62 is merged.
Copy link
Member

@missinglink missinglink left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

This sets some more permissive permissions on various directories,
files, and executables used in the Elasticsearch 5 docker image.

It allows the user the container processes run under to be changed from
the default of 1000, which helps keep things consistent with the rest of
the Pelias containers.

Fixes #46
@orangejulius
Copy link
Member Author

The pelias/elasticsearch:5.6.12 image has been updated from this branch, new sha is sha256:fb4517725390b0b345032782a7cd27104bbbdc77523670d4f00b0d728f6d7869

@orangejulius orangejulius merged commit cf8b2d1 into master Jan 17, 2019
@orangejulius orangejulius deleted the elasticsearch-any-user branch January 17, 2019 20:48
calpb pushed a commit to sorelle/docker that referenced this pull request Mar 29, 2021
In pelias#55 we added a `chown` line that
attempts to set proper permissions on the Elasticsearch data directory.

`chown` can generally only be run as root, so this PR adds handling for
the common case where `chown` fails.

In general, either the pelias CLI is run as root, and the `chown` will
succeed, or the CLI is run as the same user the Docker container
processes will run as. In this case the `mkdir` on the preceding line
will set up the directory with proper ownership.

We can't really do anything in an automated way to handle people running
the Pelias CLI as a different, non-root, user than the one they want the
containers to run with, so I think this is the best we can do.

This will be even more useful once pelias#62 is merged.
calpb pushed a commit to sorelle/docker that referenced this pull request Mar 29, 2021
fix(ES image): Allow running Elasticsearch 5 container as any user
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.

2 participants