Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/

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
&& chown -R apisix:apisix /usr/local/apisix \
&& chgrp -R 0 /usr/local/apisix \
Comment thread
AlinsRan marked this conversation as resolved.
Outdated
&& chmod -R g=u /usr/local/apisix

USER apisix

Expand Down
8 changes: 8 additions & 0 deletions redhat/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The 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
Expand Down
4 changes: 3 additions & 1 deletion ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/

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
&& chown -R apisix:apisix /usr/local/apisix \
&& chgrp -R 0 /usr/local/apisix \
&& chmod -R g=u /usr/local/apisix

USER apisix

Expand Down
Loading