You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by to...@apache.org on 2022/12/26 08:44:28 UTC

[apisix-docker] branch master updated: feat: images with non-root user for debian (#394)

This is an automated email from the ASF dual-hosted git repository.

tokers pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-docker.git


The following commit(s) were added to refs/heads/master by this push:
     new e5b6bd7  feat: images with non-root user for debian (#394)
e5b6bd7 is described below

commit e5b6bd73004acedaab6bf2a0edc00ba89b5e18db
Author: chengxiaolan <30...@users.noreply.github.com>
AuthorDate: Mon Dec 26 16:44:22 2022 +0800

    feat: images with non-root user for debian (#394)
---
 debian/Dockerfile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/debian/Dockerfile b/debian/Dockerfile
index 23b8480..07f2f3b 100644
--- a/debian/Dockerfile
+++ b/debian/Dockerfile
@@ -46,6 +46,10 @@ RUN set -ex; \
 
 WORKDIR /usr/local/apisix
 
+RUN useradd -u 1001 apisix && chown -R apisix:apisix /usr/local/apisix
+
+USER 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