tao12345666333 commented on code in PR #419:
URL: https://github.com/apache/apisix-docker/pull/419#discussion_r1096982081
##########
debian/Dockerfile:
##########
@@ -48,9 +48,9 @@ WORKDIR /usr/local/apisix
ENV
PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin
-RUN useradd -u 1001 apisix && chown -R apisix:apisix /usr/local/apisix
-
-USER apisix
+#RUN useradd -u 1001 apisix && chown -R apisix:apisix /usr/local/apisix
+#
+#USER apisix
Review Comment:
This is wrong. We need to use the apisix user to keep it secure
##########
debian/Dockerfile:
##########
@@ -22,18 +22,18 @@ ARG APISIX_VERSION=3.1.0
RUN set -ex; \
arch=$(dpkg --print-architecture); \
apt update; \
- apt-get -y install --no-install-recommends wget gnupg ca-certificates; \
+ apt-get -y install --no-install-recommends wget gnupg ca-certificates
curl; \
codename=`grep -Po 'VERSION="[0-9]+ \(\K[^)]+' /etc/os-release`; \
- wget -O - https://openresty.org/package/pubkey.gpg | apt-key add -; \
+ curl -sSL https://openresty.org/package/pubkey.gpg | sudo apt-key add -; \
case "${arch}" in \
amd64) \
echo "deb http://openresty.org/package/debian $codename openresty" |
tee /etc/apt/sources.list.d/openresty.list \
- && wget -O - http://repos.apiseven.com/pubkey.gpg | apt-key add - \
+ && curl -sSL http://repos.apiseven.com/pubkey.gpg | sudo apt-key add -
\
&& echo "deb http://repos.apiseven.com/packages/debian $codename main"
| tee /etc/apt/sources.list.d/apisix.list \
;; \
arm64) \
echo "deb http://openresty.org/package/arm64/debian $codename
openresty" | tee /etc/apt/sources.list.d/openresty.list \
- && wget -O - http://repos.apiseven.com/pubkey.gpg | apt-key add - \
+ && curl -sSL http://repos.apiseven.com/pubkey.gpg | sudo apt-key add -
\
Review Comment:
This modification is wrong. `sudo` is not needed here, and `sudo` doesn't
exist.
Please build successfully locally before submitting, thank you
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]