-
Notifications
You must be signed in to change notification settings - Fork 494
fix: Fixed Dockerfiles to be able to run in Openshift without anyuid #617
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
Merged
shreemaan-abhishek
merged 5 commits into
apache:master
from
sebgott:fix/allow-running-without-anyuid-openshift
Apr 13, 2026
+11
−2
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
36f89e3
Fixed Dockerfiles to make ownership gid 0
sebgott 3375893
Remove for debian-dev
sebgott b104dd3
Align redhat dockerfile with ubuntu and debian dockerfile
sebgott 17693a8
Change ownership to root group
sebgott 4d9c83e
Removed redundant group change
sebgott File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -35,11 +35,19 @@ WORKDIR /usr/local/apisix | |
|
|
||
| ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin | ||
|
|
||
| RUN groupadd --system --gid 636 apisix \ | ||
| && useradd --system --gid apisix --no-create-home --shell /usr/sbin/nologin --uid 636 apisix \ | ||
| && chown -R apisix:apisix /usr/local/apisix \ | ||
| && chgrp -R 0 /usr/local/apisix \ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the line above this already changes the group to 0, so you can remove this now (from all three Dockerfiles) |
||
| && chmod -R g=u /usr/local/apisix | ||
|
|
||
| # forward request and error logs to docker log collector | ||
| RUN ln -sf /dev/stdout /usr/local/apisix/logs/access.log \ | ||
| && ln -sf /dev/stderr /usr/local/apisix/logs/error.log \ | ||
| && rm /usr/local/openresty/bin/etcdctl | ||
|
|
||
| USER apisix | ||
|
|
||
| EXPOSE 9080 9443 | ||
|
|
||
| COPY ./docker-entrypoint.sh /docker-entrypoint.sh | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.