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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to