You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "janiussyafiq (via GitHub)" <gi...@apache.org> on 2026/03/05 04:35:32 UTC
[PR] chore: remove check_standalone_config.sh in favor of Lua-based validation [apisix-docker]
janiussyafiq opened a new pull request, #614:
URL: https://github.com/apache/apisix-docker/pull/614
Remove check_standalone_config.sh and all references to it, syncing with apache/apisix#12949.
The old shell script used regex pattern matching to validate standalone mode configuration (checking for role: data_plane, role_data_plane:, and config_provider: yaml in config.yaml). This approach was fragile — it could fail on valid YAML that used different formatting such as quoted values, flow syntax, or varied whitespace.
Validation is now handled semantically in APISIX core (ops.lua), making the shell-level check redundant.
Changes
- Delete utils/check_standalone_config.sh
- Remove source /check_standalone_config.sh from all entrypoint scripts
- Remove COPY ./check_standalone_config.sh from all Dockerfiles
- Remove explicit cp/rm of the script from Makefile redhat targets
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: remove check_standalone_config.sh in favor of Lua-based validation [apisix-docker]
Posted by "janiussyafiq (via GitHub)" <gi...@apache.org>.
janiussyafiq commented on code in PR #614:
URL: https://github.com/apache/apisix-docker/pull/614#discussion_r2915429328
##########
all-in-one/apisix-dashboard/Dockerfile:
##########
@@ -17,60 +17,56 @@
ARG ENABLE_PROXY=false
ARG ETCD_VERSION=v3.4.14
-ARG APISIX_VERSION=master
+ARG APISIX_VERSION=3.15.0
ARG APISIX_DASHBOARD_VERSION=master
-# Build Apache APISIX
-FROM openresty/openresty:1.25.3.2-0-alpine-fat AS production-stage
+# Build Apache APISIX (using official package with apisix-nginx-module)
+FROM debian:bullseye-slim AS production-stage
ARG APISIX_VERSION
ARG ENABLE_PROXY
LABEL apisix_version="${APISIX_VERSION}"
-RUN set -x \
- && (test "${ENABLE_PROXY}" != "true" || /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories) \
- && apk add --no-cache --virtual .builddeps \
- automake \
- autoconf \
- libtool \
- pkgconfig \
- cmake \
- make \
- clang \
- wget \
- git \
- openldap-dev \
- pcre2-dev \
- sudo \
- && wget https://github.com/yaml/libyaml/releases/download/0.2.5/yaml-0.2.5.tar.gz \
- && tar -zxvf yaml-0.2.5.tar.gz \
- && cd yaml-0.2.5 \
- && ./configure --prefix=/usr \
- && make \
- && make install \
- && ln -s /usr/lib/libyaml-0.so.2 /usr/local/lib/libyaml-0.so.2 \
- && curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | bash - \
- && git config --global url.https://github.com/.insteadOf git://github.com/ \
- && luarocks install https://raw.githubusercontent.com/apache/apisix/master/apisix-master-0.rockspec --tree=/usr/local/apisix/deps PCRE_DIR=/usr/local/openresty/pcre \
- && cp -v /usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/${APISIX_VERSION}-0/bin/apisix /usr/bin/ \
- && (if [ "$APISIX_VERSION" = "master" ] || [ "$APISIX_VERSION" \> "2.2" ]; then echo 'use shell ';else bin='#! /usr/local/openresty/luajit/bin/luajit\npackage.path = "/usr/local/apisix/?.lua;" .. package.path'; sed -i "1s@.*@$bin@" /usr/bin/apisix ; fi;) \
- && mv /usr/local/apisix/deps/share/lua/5.1/apisix /usr/local/apisix \
- && apk del .builddeps build-base make unzip clang wget
+RUN set -ex; \
+ arch=$(dpkg --print-architecture); \
+ apt-get update; \
+ apt-get -y install --no-install-recommends wget gnupg ca-certificates curl; \
+ codename=$(grep -Po 'VERSION="[0-9]+ \(\K[^)]+' /etc/os-release); \
+ case "${arch}" in \
+ amd64) \
+ wget -O - https://repos.apiseven.com/pubkey.gpg | apt-key add - \
+ && echo "deb https://repos.apiseven.com/packages/debian $codename main" \
+ | tee /etc/apt/sources.list.d/apisix.list ;; \
+ arm64) \
+ wget -O - https://repos.apiseven.com/pubkey.gpg | apt-key add - \
+ && echo "deb https://repos.apiseven.com/packages/arm64/debian $codename main" \
+ | tee /etc/apt/sources.list.d/apisix.list ;; \
+ esac; \
+ apt-get update \
+ && apt-get install -y apisix=${APISIX_VERSION}-0 \
+ && apt-get purge -y --auto-remove wget gnupg \
+ && rm -rf /var/lib/apt/lists/* \
+ && openresty -V \
+ && apisix version
Review Comment:
yes, see this: https://github.com/apache/apisix-docker/blob/642c0742c095dd16f5961c9d35e1dcc2f0f213ec/debian/Dockerfile#L37-L42
only thing removed is line 40 since we need etcd in this all in one setup
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: remove check_standalone_config.sh in favor of Lua-based validation [apisix-docker]
Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek commented on code in PR #614:
URL: https://github.com/apache/apisix-docker/pull/614#discussion_r2909668578
##########
all-in-one/apisix-dashboard/Dockerfile:
##########
@@ -17,60 +17,56 @@
ARG ENABLE_PROXY=false
ARG ETCD_VERSION=v3.4.14
-ARG APISIX_VERSION=master
+ARG APISIX_VERSION=3.15.0
ARG APISIX_DASHBOARD_VERSION=master
-# Build Apache APISIX
-FROM openresty/openresty:1.25.3.2-0-alpine-fat AS production-stage
+# Build Apache APISIX (using official package with apisix-nginx-module)
+FROM debian:bullseye-slim AS production-stage
ARG APISIX_VERSION
ARG ENABLE_PROXY
LABEL apisix_version="${APISIX_VERSION}"
-RUN set -x \
- && (test "${ENABLE_PROXY}" != "true" || /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories) \
- && apk add --no-cache --virtual .builddeps \
- automake \
- autoconf \
- libtool \
- pkgconfig \
- cmake \
- make \
- clang \
- wget \
- git \
- openldap-dev \
- pcre2-dev \
- sudo \
- && wget https://github.com/yaml/libyaml/releases/download/0.2.5/yaml-0.2.5.tar.gz \
- && tar -zxvf yaml-0.2.5.tar.gz \
- && cd yaml-0.2.5 \
- && ./configure --prefix=/usr \
- && make \
- && make install \
- && ln -s /usr/lib/libyaml-0.so.2 /usr/local/lib/libyaml-0.so.2 \
- && curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | bash - \
- && git config --global url.https://github.com/.insteadOf git://github.com/ \
- && luarocks install https://raw.githubusercontent.com/apache/apisix/master/apisix-master-0.rockspec --tree=/usr/local/apisix/deps PCRE_DIR=/usr/local/openresty/pcre \
- && cp -v /usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/${APISIX_VERSION}-0/bin/apisix /usr/bin/ \
- && (if [ "$APISIX_VERSION" = "master" ] || [ "$APISIX_VERSION" \> "2.2" ]; then echo 'use shell ';else bin='#! /usr/local/openresty/luajit/bin/luajit\npackage.path = "/usr/local/apisix/?.lua;" .. package.path'; sed -i "1s@.*@$bin@" /usr/bin/apisix ; fi;) \
- && mv /usr/local/apisix/deps/share/lua/5.1/apisix /usr/local/apisix \
- && apk del .builddeps build-base make unzip clang wget
+RUN set -ex; \
+ arch=$(dpkg --print-architecture); \
+ apt-get update; \
+ apt-get -y install --no-install-recommends wget gnupg ca-certificates curl; \
+ codename=$(grep -Po 'VERSION="[0-9]+ \(\K[^)]+' /etc/os-release); \
+ case "${arch}" in \
+ amd64) \
+ wget -O - https://repos.apiseven.com/pubkey.gpg | apt-key add - \
+ && echo "deb https://repos.apiseven.com/packages/debian $codename main" \
+ | tee /etc/apt/sources.list.d/apisix.list ;; \
+ arm64) \
+ wget -O - https://repos.apiseven.com/pubkey.gpg | apt-key add - \
+ && echo "deb https://repos.apiseven.com/packages/arm64/debian $codename main" \
+ | tee /etc/apt/sources.list.d/apisix.list ;; \
+ esac; \
+ apt-get update \
+ && apt-get install -y apisix=${APISIX_VERSION}-0 \
+ && apt-get purge -y --auto-remove wget gnupg \
+ && rm -rf /var/lib/apt/lists/* \
+ && openresty -V \
+ && apisix version
# Build etcd
-FROM alpine:3.13 AS etcd-stage
+FROM debian:bullseye-slim AS etcd-stage
ARG ETCD_VERSION
LABEL etcd_version="${ETCD_VERSION}"
WORKDIR /tmp
-RUN wget https://github.com/etcd-io/etcd/releases/download/${ETCD_VERSION}/etcd-${ETCD_VERSION}-linux-amd64.tar.gz \
- && tar -zxvf etcd-${ETCD_VERSION}-linux-amd64.tar.gz \
- && ln -s etcd-${ETCD_VERSION}-linux-amd64 etcd
+RUN set -ex; \
+ arch=$(dpkg --print-architecture); \
+ apt-get update \
+ && apt-get install -y --no-install-recommends wget ca-certificates \
+ && wget https://github.com/etcd-io/etcd/releases/download/${ETCD_VERSION}/etcd-${ETCD_VERSION}-linux-${arch}.tar.gz \
+ && tar -zxvf etcd-${ETCD_VERSION}-linux-${arch}.tar.gz \
+ && ln -s etcd-${ETCD_VERSION}-linux-${arch} etcd
Review Comment:
why did we need to change this?
##########
all-in-one/apisix-dashboard/Dockerfile:
##########
@@ -111,32 +107,31 @@ RUN if [ "$ENABLE_PROXY" = "true" ] ; then yarn config set registry https://regi
&& yarn build
# Finally combine all the resources into one image
-FROM alpine:3.13 AS last-stage
-
-ARG ENABLE_PROXY
+FROM debian:bullseye-slim AS last-stage
Review Comment:
why change the base image here?
##########
all-in-one/apisix-dashboard/Dockerfile:
##########
@@ -17,60 +17,56 @@
ARG ENABLE_PROXY=false
ARG ETCD_VERSION=v3.4.14
-ARG APISIX_VERSION=master
+ARG APISIX_VERSION=3.15.0
ARG APISIX_DASHBOARD_VERSION=master
-# Build Apache APISIX
-FROM openresty/openresty:1.25.3.2-0-alpine-fat AS production-stage
+# Build Apache APISIX (using official package with apisix-nginx-module)
+FROM debian:bullseye-slim AS production-stage
ARG APISIX_VERSION
ARG ENABLE_PROXY
LABEL apisix_version="${APISIX_VERSION}"
-RUN set -x \
- && (test "${ENABLE_PROXY}" != "true" || /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories) \
- && apk add --no-cache --virtual .builddeps \
- automake \
- autoconf \
- libtool \
- pkgconfig \
- cmake \
- make \
- clang \
- wget \
- git \
- openldap-dev \
- pcre2-dev \
- sudo \
- && wget https://github.com/yaml/libyaml/releases/download/0.2.5/yaml-0.2.5.tar.gz \
- && tar -zxvf yaml-0.2.5.tar.gz \
- && cd yaml-0.2.5 \
- && ./configure --prefix=/usr \
- && make \
- && make install \
- && ln -s /usr/lib/libyaml-0.so.2 /usr/local/lib/libyaml-0.so.2 \
- && curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | bash - \
- && git config --global url.https://github.com/.insteadOf git://github.com/ \
- && luarocks install https://raw.githubusercontent.com/apache/apisix/master/apisix-master-0.rockspec --tree=/usr/local/apisix/deps PCRE_DIR=/usr/local/openresty/pcre \
- && cp -v /usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/${APISIX_VERSION}-0/bin/apisix /usr/bin/ \
- && (if [ "$APISIX_VERSION" = "master" ] || [ "$APISIX_VERSION" \> "2.2" ]; then echo 'use shell ';else bin='#! /usr/local/openresty/luajit/bin/luajit\npackage.path = "/usr/local/apisix/?.lua;" .. package.path'; sed -i "1s@.*@$bin@" /usr/bin/apisix ; fi;) \
- && mv /usr/local/apisix/deps/share/lua/5.1/apisix /usr/local/apisix \
- && apk del .builddeps build-base make unzip clang wget
+RUN set -ex; \
+ arch=$(dpkg --print-architecture); \
+ apt-get update; \
+ apt-get -y install --no-install-recommends wget gnupg ca-certificates curl; \
+ codename=$(grep -Po 'VERSION="[0-9]+ \(\K[^)]+' /etc/os-release); \
+ case "${arch}" in \
+ amd64) \
+ wget -O - https://repos.apiseven.com/pubkey.gpg | apt-key add - \
+ && echo "deb https://repos.apiseven.com/packages/debian $codename main" \
+ | tee /etc/apt/sources.list.d/apisix.list ;; \
+ arm64) \
+ wget -O - https://repos.apiseven.com/pubkey.gpg | apt-key add - \
+ && echo "deb https://repos.apiseven.com/packages/arm64/debian $codename main" \
+ | tee /etc/apt/sources.list.d/apisix.list ;; \
+ esac; \
+ apt-get update \
+ && apt-get install -y apisix=${APISIX_VERSION}-0 \
+ && apt-get purge -y --auto-remove wget gnupg \
+ && rm -rf /var/lib/apt/lists/* \
+ && openresty -V \
+ && apisix version
Review Comment:
this is similar to how other dockerfiles build APISIX right?
##########
all-in-one/apisix-dashboard/Dockerfile:
##########
@@ -17,60 +17,56 @@
ARG ENABLE_PROXY=false
ARG ETCD_VERSION=v3.4.14
-ARG APISIX_VERSION=master
+ARG APISIX_VERSION=3.15.0
Review Comment:
I think we don't need to change this.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: remove check_standalone_config.sh in favor of Lua-based validation [apisix-docker]
Posted by "janiussyafiq (via GitHub)" <gi...@apache.org>.
janiussyafiq commented on code in PR #614:
URL: https://github.com/apache/apisix-docker/pull/614#discussion_r2915440939
##########
all-in-one/apisix-dashboard/Dockerfile:
##########
@@ -17,60 +17,56 @@
ARG ENABLE_PROXY=false
ARG ETCD_VERSION=v3.4.14
-ARG APISIX_VERSION=master
+ARG APISIX_VERSION=3.15.0
ARG APISIX_DASHBOARD_VERSION=master
-# Build Apache APISIX
-FROM openresty/openresty:1.25.3.2-0-alpine-fat AS production-stage
+# Build Apache APISIX (using official package with apisix-nginx-module)
+FROM debian:bullseye-slim AS production-stage
Review Comment:
added PR desc
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: remove check_standalone_config.sh in favor of Lua-based validation [apisix-docker]
Posted by "janiussyafiq (via GitHub)" <gi...@apache.org>.
janiussyafiq commented on code in PR #614:
URL: https://github.com/apache/apisix-docker/pull/614#discussion_r2915440213
##########
all-in-one/apisix-dashboard/Dockerfile:
##########
@@ -17,60 +17,56 @@
ARG ENABLE_PROXY=false
ARG ETCD_VERSION=v3.4.14
-ARG APISIX_VERSION=master
+ARG APISIX_VERSION=3.15.0
ARG APISIX_DASHBOARD_VERSION=master
-# Build Apache APISIX
-FROM openresty/openresty:1.25.3.2-0-alpine-fat AS production-stage
+# Build Apache APISIX (using official package with apisix-nginx-module)
+FROM debian:bullseye-slim AS production-stage
ARG APISIX_VERSION
ARG ENABLE_PROXY
LABEL apisix_version="${APISIX_VERSION}"
-RUN set -x \
- && (test "${ENABLE_PROXY}" != "true" || /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories) \
- && apk add --no-cache --virtual .builddeps \
- automake \
- autoconf \
- libtool \
- pkgconfig \
- cmake \
- make \
- clang \
- wget \
- git \
- openldap-dev \
- pcre2-dev \
- sudo \
- && wget https://github.com/yaml/libyaml/releases/download/0.2.5/yaml-0.2.5.tar.gz \
- && tar -zxvf yaml-0.2.5.tar.gz \
- && cd yaml-0.2.5 \
- && ./configure --prefix=/usr \
- && make \
- && make install \
- && ln -s /usr/lib/libyaml-0.so.2 /usr/local/lib/libyaml-0.so.2 \
- && curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | bash - \
- && git config --global url.https://github.com/.insteadOf git://github.com/ \
- && luarocks install https://raw.githubusercontent.com/apache/apisix/master/apisix-master-0.rockspec --tree=/usr/local/apisix/deps PCRE_DIR=/usr/local/openresty/pcre \
- && cp -v /usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/${APISIX_VERSION}-0/bin/apisix /usr/bin/ \
- && (if [ "$APISIX_VERSION" = "master" ] || [ "$APISIX_VERSION" \> "2.2" ]; then echo 'use shell ';else bin='#! /usr/local/openresty/luajit/bin/luajit\npackage.path = "/usr/local/apisix/?.lua;" .. package.path'; sed -i "1s@.*@$bin@" /usr/bin/apisix ; fi;) \
- && mv /usr/local/apisix/deps/share/lua/5.1/apisix /usr/local/apisix \
- && apk del .builddeps build-base make unzip clang wget
+RUN set -ex; \
+ arch=$(dpkg --print-architecture); \
+ apt-get update; \
+ apt-get -y install --no-install-recommends wget gnupg ca-certificates curl; \
+ codename=$(grep -Po 'VERSION="[0-9]+ \(\K[^)]+' /etc/os-release); \
+ case "${arch}" in \
+ amd64) \
+ wget -O - https://repos.apiseven.com/pubkey.gpg | apt-key add - \
+ && echo "deb https://repos.apiseven.com/packages/debian $codename main" \
+ | tee /etc/apt/sources.list.d/apisix.list ;; \
+ arm64) \
+ wget -O - https://repos.apiseven.com/pubkey.gpg | apt-key add - \
+ && echo "deb https://repos.apiseven.com/packages/arm64/debian $codename main" \
+ | tee /etc/apt/sources.list.d/apisix.list ;; \
+ esac; \
+ apt-get update \
+ && apt-get install -y apisix=${APISIX_VERSION}-0 \
+ && apt-get purge -y --auto-remove wget gnupg \
+ && rm -rf /var/lib/apt/lists/* \
+ && openresty -V \
+ && apisix version
# Build etcd
-FROM alpine:3.13 AS etcd-stage
+FROM debian:bullseye-slim AS etcd-stage
ARG ETCD_VERSION
LABEL etcd_version="${ETCD_VERSION}"
WORKDIR /tmp
-RUN wget https://github.com/etcd-io/etcd/releases/download/${ETCD_VERSION}/etcd-${ETCD_VERSION}-linux-amd64.tar.gz \
- && tar -zxvf etcd-${ETCD_VERSION}-linux-amd64.tar.gz \
- && ln -s etcd-${ETCD_VERSION}-linux-amd64 etcd
+RUN set -ex; \
+ arch=$(dpkg --print-architecture); \
+ apt-get update \
+ && apt-get install -y --no-install-recommends wget ca-certificates \
+ && wget https://github.com/etcd-io/etcd/releases/download/${ETCD_VERSION}/etcd-${ETCD_VERSION}-linux-${arch}.tar.gz \
+ && tar -zxvf etcd-${ETCD_VERSION}-linux-${arch}.tar.gz \
+ && ln -s etcd-${ETCD_VERSION}-linux-${arch} etcd
Review Comment:
was made to match etcd debian but indeed wasn't need. reverted :)
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: remove check_standalone_config.sh in favor of Lua-based validation [apisix-docker]
Posted by "janiussyafiq (via GitHub)" <gi...@apache.org>.
janiussyafiq commented on code in PR #614:
URL: https://github.com/apache/apisix-docker/pull/614#discussion_r2915434698
##########
all-in-one/apisix-dashboard/Dockerfile:
##########
@@ -111,32 +107,31 @@ RUN if [ "$ENABLE_PROXY" = "true" ] ; then yarn config set registry https://regi
&& yarn build
# Finally combine all the resources into one image
-FROM alpine:3.13 AS last-stage
-
-ARG ENABLE_PROXY
+FROM debian:bullseye-slim AS last-stage
Review Comment:
alpine as last-stage is not compatible with debian as production-stage due to glibc incompatibility. the build will fail if no changes made
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: remove check_standalone_config.sh in favor of Lua-based validation [apisix-docker]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #614:
URL: https://github.com/apache/apisix-docker/pull/614#discussion_r2915460239
##########
all-in-one/apisix-dashboard/Dockerfile:
##########
@@ -17,45 +17,36 @@
ARG ENABLE_PROXY=false
ARG ETCD_VERSION=v3.4.14
-ARG APISIX_VERSION=master
+ARG APISIX_VERSION=3.15.0
ARG APISIX_DASHBOARD_VERSION=master
-# Build Apache APISIX
-FROM openresty/openresty:1.25.3.2-0-alpine-fat AS production-stage
+# Build Apache APISIX (using official package with apisix-nginx-module)
+FROM debian:bullseye-slim AS production-stage
ARG APISIX_VERSION
ARG ENABLE_PROXY
LABEL apisix_version="${APISIX_VERSION}"
-RUN set -x \
- && (test "${ENABLE_PROXY}" != "true" || /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories) \
- && apk add --no-cache --virtual .builddeps \
- automake \
- autoconf \
- libtool \
- pkgconfig \
- cmake \
- make \
- clang \
- wget \
- git \
- openldap-dev \
- pcre2-dev \
- sudo \
- && wget https://github.com/yaml/libyaml/releases/download/0.2.5/yaml-0.2.5.tar.gz \
- && tar -zxvf yaml-0.2.5.tar.gz \
- && cd yaml-0.2.5 \
- && ./configure --prefix=/usr \
- && make \
- && make install \
- && ln -s /usr/lib/libyaml-0.so.2 /usr/local/lib/libyaml-0.so.2 \
- && curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | bash - \
- && git config --global url.https://github.com/.insteadOf git://github.com/ \
- && luarocks install https://raw.githubusercontent.com/apache/apisix/master/apisix-master-0.rockspec --tree=/usr/local/apisix/deps PCRE_DIR=/usr/local/openresty/pcre \
- && cp -v /usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/${APISIX_VERSION}-0/bin/apisix /usr/bin/ \
- && (if [ "$APISIX_VERSION" = "master" ] || [ "$APISIX_VERSION" \> "2.2" ]; then echo 'use shell ';else bin='#! /usr/local/openresty/luajit/bin/luajit\npackage.path = "/usr/local/apisix/?.lua;" .. package.path'; sed -i "1s@.*@$bin@" /usr/bin/apisix ; fi;) \
- && mv /usr/local/apisix/deps/share/lua/5.1/apisix /usr/local/apisix \
- && apk del .builddeps build-base make unzip clang wget
+RUN set -ex; \
+ arch=$(dpkg --print-architecture); \
+ apt update; \
+ apt-get -y install --no-install-recommends wget gnupg ca-certificates curl; \
+ codename=`grep -Po 'VERSION="[0-9]+ \(\K[^)]+' /etc/os-release`; \
Review Comment:
`ENABLE_PROXY` is declared for this stage but no longer affects how Debian packages are fetched (unlike the previous Alpine build). If this build arg is still intended to support constrained networks, add an equivalent apt configuration (mirror/proxy) or remove the arg to avoid a misleading interface.
##########
all-in-one/apisix-dashboard/Dockerfile:
##########
@@ -17,45 +17,36 @@
ARG ENABLE_PROXY=false
ARG ETCD_VERSION=v3.4.14
-ARG APISIX_VERSION=master
+ARG APISIX_VERSION=3.15.0
ARG APISIX_DASHBOARD_VERSION=master
-# Build Apache APISIX
-FROM openresty/openresty:1.25.3.2-0-alpine-fat AS production-stage
+# Build Apache APISIX (using official package with apisix-nginx-module)
+FROM debian:bullseye-slim AS production-stage
ARG APISIX_VERSION
ARG ENABLE_PROXY
LABEL apisix_version="${APISIX_VERSION}"
-RUN set -x \
- && (test "${ENABLE_PROXY}" != "true" || /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories) \
- && apk add --no-cache --virtual .builddeps \
- automake \
- autoconf \
- libtool \
- pkgconfig \
- cmake \
- make \
- clang \
- wget \
- git \
- openldap-dev \
- pcre2-dev \
- sudo \
- && wget https://github.com/yaml/libyaml/releases/download/0.2.5/yaml-0.2.5.tar.gz \
- && tar -zxvf yaml-0.2.5.tar.gz \
- && cd yaml-0.2.5 \
- && ./configure --prefix=/usr \
- && make \
- && make install \
- && ln -s /usr/lib/libyaml-0.so.2 /usr/local/lib/libyaml-0.so.2 \
- && curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | bash - \
- && git config --global url.https://github.com/.insteadOf git://github.com/ \
- && luarocks install https://raw.githubusercontent.com/apache/apisix/master/apisix-master-0.rockspec --tree=/usr/local/apisix/deps PCRE_DIR=/usr/local/openresty/pcre \
- && cp -v /usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/${APISIX_VERSION}-0/bin/apisix /usr/bin/ \
- && (if [ "$APISIX_VERSION" = "master" ] || [ "$APISIX_VERSION" \> "2.2" ]; then echo 'use shell ';else bin='#! /usr/local/openresty/luajit/bin/luajit\npackage.path = "/usr/local/apisix/?.lua;" .. package.path'; sed -i "1s@.*@$bin@" /usr/bin/apisix ; fi;) \
- && mv /usr/local/apisix/deps/share/lua/5.1/apisix /usr/local/apisix \
- && apk del .builddeps build-base make unzip clang wget
+RUN set -ex; \
+ arch=$(dpkg --print-architecture); \
+ apt update; \
+ apt-get -y install --no-install-recommends wget gnupg ca-certificates curl; \
+ codename=`grep -Po 'VERSION="[0-9]+ \(\K[^)]+' /etc/os-release`; \
+ case "${arch}" in \
+ amd64) \
+ wget -O - https://repos.apiseven.com/pubkey.gpg | apt-key add - \
+ && echo "deb https://repos.apiseven.com/packages/debian $codename main" | tee /etc/apt/sources.list.d/apisix.list \
+ ;; \
+ arm64) \
+ wget -O - https://repos.apiseven.com/pubkey.gpg | apt-key add - \
+ && echo "deb https://repos.apiseven.com/packages/arm64/debian $codename main" | tee /etc/apt/sources.list.d/apisix.list \
Review Comment:
This stage uses `apt-key add`, which is deprecated in Debian/Ubuntu and can break on newer base images. Prefer installing the repo key into `/usr/share/keyrings/...` and referencing it via `deb [signed-by=...] ...` in the sources list entry.
```suggestion
wget -O /usr/share/keyrings/apisix-archive-keyring.gpg https://repos.apiseven.com/pubkey.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/apisix-archive-keyring.gpg] https://repos.apiseven.com/packages/debian $codename main" | tee /etc/apt/sources.list.d/apisix.list \
;; \
arm64) \
wget -O /usr/share/keyrings/apisix-archive-keyring.gpg https://repos.apiseven.com/pubkey.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/apisix-archive-keyring.gpg] https://repos.apiseven.com/packages/arm64/debian $codename main" | tee /etc/apt/sources.list.d/apisix.list \
```
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: remove check_standalone_config.sh in favor of Lua-based validation [apisix-docker]
Posted by "janiussyafiq (via GitHub)" <gi...@apache.org>.
janiussyafiq commented on code in PR #614:
URL: https://github.com/apache/apisix-docker/pull/614#discussion_r2915482364
##########
all-in-one/apisix-dashboard/Dockerfile:
##########
@@ -17,45 +17,36 @@
ARG ENABLE_PROXY=false
ARG ETCD_VERSION=v3.4.14
-ARG APISIX_VERSION=master
+ARG APISIX_VERSION=3.15.0
ARG APISIX_DASHBOARD_VERSION=master
-# Build Apache APISIX
-FROM openresty/openresty:1.25.3.2-0-alpine-fat AS production-stage
+# Build Apache APISIX (using official package with apisix-nginx-module)
+FROM debian:bullseye-slim AS production-stage
ARG APISIX_VERSION
ARG ENABLE_PROXY
LABEL apisix_version="${APISIX_VERSION}"
-RUN set -x \
- && (test "${ENABLE_PROXY}" != "true" || /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories) \
- && apk add --no-cache --virtual .builddeps \
- automake \
- autoconf \
- libtool \
- pkgconfig \
- cmake \
- make \
- clang \
- wget \
- git \
- openldap-dev \
- pcre2-dev \
- sudo \
- && wget https://github.com/yaml/libyaml/releases/download/0.2.5/yaml-0.2.5.tar.gz \
- && tar -zxvf yaml-0.2.5.tar.gz \
- && cd yaml-0.2.5 \
- && ./configure --prefix=/usr \
- && make \
- && make install \
- && ln -s /usr/lib/libyaml-0.so.2 /usr/local/lib/libyaml-0.so.2 \
- && curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | bash - \
- && git config --global url.https://github.com/.insteadOf git://github.com/ \
- && luarocks install https://raw.githubusercontent.com/apache/apisix/master/apisix-master-0.rockspec --tree=/usr/local/apisix/deps PCRE_DIR=/usr/local/openresty/pcre \
- && cp -v /usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/${APISIX_VERSION}-0/bin/apisix /usr/bin/ \
- && (if [ "$APISIX_VERSION" = "master" ] || [ "$APISIX_VERSION" \> "2.2" ]; then echo 'use shell ';else bin='#! /usr/local/openresty/luajit/bin/luajit\npackage.path = "/usr/local/apisix/?.lua;" .. package.path'; sed -i "1s@.*@$bin@" /usr/bin/apisix ; fi;) \
- && mv /usr/local/apisix/deps/share/lua/5.1/apisix /usr/local/apisix \
- && apk del .builddeps build-base make unzip clang wget
+RUN set -ex; \
+ arch=$(dpkg --print-architecture); \
+ apt update; \
+ apt-get -y install --no-install-recommends wget gnupg ca-certificates curl; \
+ codename=`grep -Po 'VERSION="[0-9]+ \(\K[^)]+' /etc/os-release`; \
Review Comment:
fixed
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: remove check_standalone_config.sh in favor of Lua-based validation [apisix-docker]
Posted by "janiussyafiq (via GitHub)" <gi...@apache.org>.
janiussyafiq commented on code in PR #614:
URL: https://github.com/apache/apisix-docker/pull/614#discussion_r2915414517
##########
all-in-one/apisix-dashboard/Dockerfile:
##########
@@ -17,60 +17,56 @@
ARG ENABLE_PROXY=false
ARG ETCD_VERSION=v3.4.14
-ARG APISIX_VERSION=master
+ARG APISIX_VERSION=3.15.0
Review Comment:
this is necessary since apiseven.com package repo only publishes released versions. other dockerfiles also use this approach https://github.com/apache/apisix-docker/blob/642c0742c095dd16f5961c9d35e1dcc2f0f213ec/debian/Dockerfile#L20
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: remove check_standalone_config.sh in favor of Lua-based validation [apisix-docker]
Posted by "janiussyafiq (via GitHub)" <gi...@apache.org>.
janiussyafiq commented on code in PR #614:
URL: https://github.com/apache/apisix-docker/pull/614#discussion_r2915480452
##########
all-in-one/apisix-dashboard/Dockerfile:
##########
@@ -17,45 +17,36 @@
ARG ENABLE_PROXY=false
ARG ETCD_VERSION=v3.4.14
-ARG APISIX_VERSION=master
+ARG APISIX_VERSION=3.15.0
ARG APISIX_DASHBOARD_VERSION=master
-# Build Apache APISIX
-FROM openresty/openresty:1.25.3.2-0-alpine-fat AS production-stage
+# Build Apache APISIX (using official package with apisix-nginx-module)
+FROM debian:bullseye-slim AS production-stage
ARG APISIX_VERSION
ARG ENABLE_PROXY
LABEL apisix_version="${APISIX_VERSION}"
-RUN set -x \
- && (test "${ENABLE_PROXY}" != "true" || /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories) \
- && apk add --no-cache --virtual .builddeps \
- automake \
- autoconf \
- libtool \
- pkgconfig \
- cmake \
- make \
- clang \
- wget \
- git \
- openldap-dev \
- pcre2-dev \
- sudo \
- && wget https://github.com/yaml/libyaml/releases/download/0.2.5/yaml-0.2.5.tar.gz \
- && tar -zxvf yaml-0.2.5.tar.gz \
- && cd yaml-0.2.5 \
- && ./configure --prefix=/usr \
- && make \
- && make install \
- && ln -s /usr/lib/libyaml-0.so.2 /usr/local/lib/libyaml-0.so.2 \
- && curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | bash - \
- && git config --global url.https://github.com/.insteadOf git://github.com/ \
- && luarocks install https://raw.githubusercontent.com/apache/apisix/master/apisix-master-0.rockspec --tree=/usr/local/apisix/deps PCRE_DIR=/usr/local/openresty/pcre \
- && cp -v /usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/${APISIX_VERSION}-0/bin/apisix /usr/bin/ \
- && (if [ "$APISIX_VERSION" = "master" ] || [ "$APISIX_VERSION" \> "2.2" ]; then echo 'use shell ';else bin='#! /usr/local/openresty/luajit/bin/luajit\npackage.path = "/usr/local/apisix/?.lua;" .. package.path'; sed -i "1s@.*@$bin@" /usr/bin/apisix ; fi;) \
- && mv /usr/local/apisix/deps/share/lua/5.1/apisix /usr/local/apisix \
- && apk del .builddeps build-base make unzip clang wget
+RUN set -ex; \
+ arch=$(dpkg --print-architecture); \
+ apt update; \
+ apt-get -y install --no-install-recommends wget gnupg ca-certificates curl; \
+ codename=`grep -Po 'VERSION="[0-9]+ \(\K[^)]+' /etc/os-release`; \
+ case "${arch}" in \
+ amd64) \
+ wget -O - https://repos.apiseven.com/pubkey.gpg | apt-key add - \
+ && echo "deb https://repos.apiseven.com/packages/debian $codename main" | tee /etc/apt/sources.list.d/apisix.list \
+ ;; \
+ arm64) \
+ wget -O - https://repos.apiseven.com/pubkey.gpg | apt-key add - \
+ && echo "deb https://repos.apiseven.com/packages/arm64/debian $codename main" | tee /etc/apt/sources.list.d/apisix.list \
Review Comment:
followed other dockerfile conventions
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: remove check_standalone_config.sh in favor of Lua-based validation [apisix-docker]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #614:
URL: https://github.com/apache/apisix-docker/pull/614#discussion_r2909677392
##########
all-in-one/apisix-dashboard/Dockerfile:
##########
@@ -17,60 +17,56 @@
ARG ENABLE_PROXY=false
ARG ETCD_VERSION=v3.4.14
-ARG APISIX_VERSION=master
+ARG APISIX_VERSION=3.15.0
ARG APISIX_DASHBOARD_VERSION=master
-# Build Apache APISIX
-FROM openresty/openresty:1.25.3.2-0-alpine-fat AS production-stage
+# Build Apache APISIX (using official package with apisix-nginx-module)
+FROM debian:bullseye-slim AS production-stage
ARG APISIX_VERSION
ARG ENABLE_PROXY
LABEL apisix_version="${APISIX_VERSION}"
-RUN set -x \
- && (test "${ENABLE_PROXY}" != "true" || /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories) \
- && apk add --no-cache --virtual .builddeps \
- automake \
- autoconf \
- libtool \
- pkgconfig \
- cmake \
- make \
- clang \
- wget \
- git \
- openldap-dev \
- pcre2-dev \
- sudo \
- && wget https://github.com/yaml/libyaml/releases/download/0.2.5/yaml-0.2.5.tar.gz \
- && tar -zxvf yaml-0.2.5.tar.gz \
- && cd yaml-0.2.5 \
- && ./configure --prefix=/usr \
- && make \
- && make install \
- && ln -s /usr/lib/libyaml-0.so.2 /usr/local/lib/libyaml-0.so.2 \
- && curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | bash - \
- && git config --global url.https://github.com/.insteadOf git://github.com/ \
- && luarocks install https://raw.githubusercontent.com/apache/apisix/master/apisix-master-0.rockspec --tree=/usr/local/apisix/deps PCRE_DIR=/usr/local/openresty/pcre \
- && cp -v /usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/${APISIX_VERSION}-0/bin/apisix /usr/bin/ \
- && (if [ "$APISIX_VERSION" = "master" ] || [ "$APISIX_VERSION" \> "2.2" ]; then echo 'use shell ';else bin='#! /usr/local/openresty/luajit/bin/luajit\npackage.path = "/usr/local/apisix/?.lua;" .. package.path'; sed -i "1s@.*@$bin@" /usr/bin/apisix ; fi;) \
- && mv /usr/local/apisix/deps/share/lua/5.1/apisix /usr/local/apisix \
- && apk del .builddeps build-base make unzip clang wget
+RUN set -ex; \
+ arch=$(dpkg --print-architecture); \
+ apt-get update; \
+ apt-get -y install --no-install-recommends wget gnupg ca-certificates curl; \
+ codename=$(grep -Po 'VERSION="[0-9]+ \(\K[^)]+' /etc/os-release); \
+ case "${arch}" in \
+ amd64) \
+ wget -O - https://repos.apiseven.com/pubkey.gpg | apt-key add - \
+ && echo "deb https://repos.apiseven.com/packages/debian $codename main" \
+ | tee /etc/apt/sources.list.d/apisix.list ;; \
+ arm64) \
+ wget -O - https://repos.apiseven.com/pubkey.gpg | apt-key add - \
+ && echo "deb https://repos.apiseven.com/packages/arm64/debian $codename main" \
+ | tee /etc/apt/sources.list.d/apisix.list ;; \
Review Comment:
Using `apt-key add` is deprecated on Debian/Ubuntu and adds the key to the global trusted keyring. Prefer installing the repo key into `/usr/share/keyrings` (via `gpg --dearmor`) and referencing it with `deb [signed-by=...] ...` to avoid future breakage and reduce the trust scope.
##########
all-in-one/apisix-dashboard/Dockerfile:
##########
@@ -17,60 +17,56 @@
ARG ENABLE_PROXY=false
ARG ETCD_VERSION=v3.4.14
-ARG APISIX_VERSION=master
+ARG APISIX_VERSION=3.15.0
ARG APISIX_DASHBOARD_VERSION=master
-# Build Apache APISIX
-FROM openresty/openresty:1.25.3.2-0-alpine-fat AS production-stage
+# Build Apache APISIX (using official package with apisix-nginx-module)
+FROM debian:bullseye-slim AS production-stage
Review Comment:
The PR description focuses on removing check_standalone_config.sh, but this Dockerfile also switches the APISIX build to a Debian-based image and changes the default APISIX_VERSION (and overall build approach). This is a substantial behavioral change that should either be called out explicitly in the PR description or moved into a separate PR to keep scope/risk reviewable.
##########
all-in-one/apisix-dashboard/Dockerfile:
##########
@@ -17,60 +17,56 @@
ARG ENABLE_PROXY=false
ARG ETCD_VERSION=v3.4.14
-ARG APISIX_VERSION=master
+ARG APISIX_VERSION=3.15.0
ARG APISIX_DASHBOARD_VERSION=master
-# Build Apache APISIX
-FROM openresty/openresty:1.25.3.2-0-alpine-fat AS production-stage
+# Build Apache APISIX (using official package with apisix-nginx-module)
+FROM debian:bullseye-slim AS production-stage
ARG APISIX_VERSION
ARG ENABLE_PROXY
LABEL apisix_version="${APISIX_VERSION}"
-RUN set -x \
- && (test "${ENABLE_PROXY}" != "true" || /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories) \
- && apk add --no-cache --virtual .builddeps \
- automake \
- autoconf \
- libtool \
- pkgconfig \
- cmake \
- make \
- clang \
- wget \
- git \
- openldap-dev \
- pcre2-dev \
- sudo \
- && wget https://github.com/yaml/libyaml/releases/download/0.2.5/yaml-0.2.5.tar.gz \
- && tar -zxvf yaml-0.2.5.tar.gz \
- && cd yaml-0.2.5 \
- && ./configure --prefix=/usr \
- && make \
- && make install \
- && ln -s /usr/lib/libyaml-0.so.2 /usr/local/lib/libyaml-0.so.2 \
- && curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | bash - \
- && git config --global url.https://github.com/.insteadOf git://github.com/ \
- && luarocks install https://raw.githubusercontent.com/apache/apisix/master/apisix-master-0.rockspec --tree=/usr/local/apisix/deps PCRE_DIR=/usr/local/openresty/pcre \
- && cp -v /usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/${APISIX_VERSION}-0/bin/apisix /usr/bin/ \
- && (if [ "$APISIX_VERSION" = "master" ] || [ "$APISIX_VERSION" \> "2.2" ]; then echo 'use shell ';else bin='#! /usr/local/openresty/luajit/bin/luajit\npackage.path = "/usr/local/apisix/?.lua;" .. package.path'; sed -i "1s@.*@$bin@" /usr/bin/apisix ; fi;) \
- && mv /usr/local/apisix/deps/share/lua/5.1/apisix /usr/local/apisix \
- && apk del .builddeps build-base make unzip clang wget
+RUN set -ex; \
+ arch=$(dpkg --print-architecture); \
+ apt-get update; \
+ apt-get -y install --no-install-recommends wget gnupg ca-certificates curl; \
+ codename=$(grep -Po 'VERSION="[0-9]+ \(\K[^)]+' /etc/os-release); \
+ case "${arch}" in \
+ amd64) \
+ wget -O - https://repos.apiseven.com/pubkey.gpg | apt-key add - \
+ && echo "deb https://repos.apiseven.com/packages/debian $codename main" \
+ | tee /etc/apt/sources.list.d/apisix.list ;; \
+ arm64) \
+ wget -O - https://repos.apiseven.com/pubkey.gpg | apt-key add - \
+ && echo "deb https://repos.apiseven.com/packages/arm64/debian $codename main" \
+ | tee /etc/apt/sources.list.d/apisix.list ;; \
+ esac; \
+ apt-get update \
+ && apt-get install -y apisix=${APISIX_VERSION}-0 \
+ && apt-get purge -y --auto-remove wget gnupg \
+ && rm -rf /var/lib/apt/lists/* \
+ && openresty -V \
+ && apisix version
# Build etcd
-FROM alpine:3.13 AS etcd-stage
+FROM debian:bullseye-slim AS etcd-stage
ARG ETCD_VERSION
LABEL etcd_version="${ETCD_VERSION}"
WORKDIR /tmp
-RUN wget https://github.com/etcd-io/etcd/releases/download/${ETCD_VERSION}/etcd-${ETCD_VERSION}-linux-amd64.tar.gz \
- && tar -zxvf etcd-${ETCD_VERSION}-linux-amd64.tar.gz \
- && ln -s etcd-${ETCD_VERSION}-linux-amd64 etcd
+RUN set -ex; \
+ arch=$(dpkg --print-architecture); \
+ apt-get update \
+ && apt-get install -y --no-install-recommends wget ca-certificates \
+ && wget https://github.com/etcd-io/etcd/releases/download/${ETCD_VERSION}/etcd-${ETCD_VERSION}-linux-${arch}.tar.gz \
+ && tar -zxvf etcd-${ETCD_VERSION}-linux-${arch}.tar.gz \
Review Comment:
This Dockerfile downloads prebuilt `etcd` binaries via `wget` directly from GitHub releases and places them into the final image without any checksum or signature verification. If the release tarball or the download channel is compromised, an attacker could supply a malicious `etcd`/`etcdctl` binary that runs with full privileges inside the APISIX container. Add explicit integrity verification for the downloaded archive (for example, by validating a pinned checksum or signature) before extracting and copying the binaries into the image.
##########
all-in-one/apisix-dashboard/Dockerfile:
##########
@@ -17,60 +17,56 @@
ARG ENABLE_PROXY=false
ARG ETCD_VERSION=v3.4.14
-ARG APISIX_VERSION=master
+ARG APISIX_VERSION=3.15.0
ARG APISIX_DASHBOARD_VERSION=master
-# Build Apache APISIX
-FROM openresty/openresty:1.25.3.2-0-alpine-fat AS production-stage
+# Build Apache APISIX (using official package with apisix-nginx-module)
+FROM debian:bullseye-slim AS production-stage
ARG APISIX_VERSION
ARG ENABLE_PROXY
LABEL apisix_version="${APISIX_VERSION}"
-RUN set -x \
- && (test "${ENABLE_PROXY}" != "true" || /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories) \
- && apk add --no-cache --virtual .builddeps \
- automake \
- autoconf \
- libtool \
- pkgconfig \
- cmake \
- make \
- clang \
- wget \
- git \
- openldap-dev \
- pcre2-dev \
- sudo \
- && wget https://github.com/yaml/libyaml/releases/download/0.2.5/yaml-0.2.5.tar.gz \
- && tar -zxvf yaml-0.2.5.tar.gz \
- && cd yaml-0.2.5 \
- && ./configure --prefix=/usr \
- && make \
- && make install \
- && ln -s /usr/lib/libyaml-0.so.2 /usr/local/lib/libyaml-0.so.2 \
- && curl https://raw.githubusercontent.com/apache/apisix/master/utils/linux-install-luarocks.sh -sL | bash - \
- && git config --global url.https://github.com/.insteadOf git://github.com/ \
- && luarocks install https://raw.githubusercontent.com/apache/apisix/master/apisix-master-0.rockspec --tree=/usr/local/apisix/deps PCRE_DIR=/usr/local/openresty/pcre \
- && cp -v /usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/${APISIX_VERSION}-0/bin/apisix /usr/bin/ \
- && (if [ "$APISIX_VERSION" = "master" ] || [ "$APISIX_VERSION" \> "2.2" ]; then echo 'use shell ';else bin='#! /usr/local/openresty/luajit/bin/luajit\npackage.path = "/usr/local/apisix/?.lua;" .. package.path'; sed -i "1s@.*@$bin@" /usr/bin/apisix ; fi;) \
- && mv /usr/local/apisix/deps/share/lua/5.1/apisix /usr/local/apisix \
- && apk del .builddeps build-base make unzip clang wget
+RUN set -ex; \
+ arch=$(dpkg --print-architecture); \
+ apt-get update; \
+ apt-get -y install --no-install-recommends wget gnupg ca-certificates curl; \
+ codename=$(grep -Po 'VERSION="[0-9]+ \(\K[^)]+' /etc/os-release); \
+ case "${arch}" in \
+ amd64) \
+ wget -O - https://repos.apiseven.com/pubkey.gpg | apt-key add - \
+ && echo "deb https://repos.apiseven.com/packages/debian $codename main" \
+ | tee /etc/apt/sources.list.d/apisix.list ;; \
+ arm64) \
+ wget -O - https://repos.apiseven.com/pubkey.gpg | apt-key add - \
+ && echo "deb https://repos.apiseven.com/packages/arm64/debian $codename main" \
+ | tee /etc/apt/sources.list.d/apisix.list ;; \
+ esac; \
Review Comment:
The `case "${arch}"` has no default branch. On any unsupported architecture the build will proceed without configuring the APISIX repo and then fail later with a less actionable apt error. Add a `*)` branch that prints a clear message and exits non-zero (or map additional supported arches explicitly).
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] chore: remove check_standalone_config.sh in favor of Lua-based validation [apisix-docker]
Posted by "shreemaan-abhishek (via GitHub)" <gi...@apache.org>.
shreemaan-abhishek merged PR #614:
URL: https://github.com/apache/apisix-docker/pull/614
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org