diff --git a/all-in-one/apisix-dashboard/Dockerfile b/all-in-one/apisix-dashboard/Dockerfile index a25a359b..b832bf3d 100644 --- a/all-in-one/apisix-dashboard/Dockerfile +++ b/all-in-one/apisix-dashboard/Dockerfile @@ -51,7 +51,8 @@ RUN set -x \ && 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 + && apk del .builddeps build-base make unzip \ + && rm /usr/local/openresty/bin/etcdctl # Build etcd diff --git a/all-in-one/apisix/Dockerfile b/all-in-one/apisix/Dockerfile index db0e2be2..5de9d0d7 100644 --- a/all-in-one/apisix/Dockerfile +++ b/all-in-one/apisix/Dockerfile @@ -31,7 +31,8 @@ USER root 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 \ - && mv etcd-${ETCD_VERSION}-linux-amd64/* /usr/bin/ + && mv etcd-${ETCD_VERSION}-linux-amd64/* /usr/bin/ \ + && rm /usr/local/openresty/bin/etcdctl WORKDIR /usr/local/apisix diff --git a/dashboard/Dockerfile.alpine b/dashboard/Dockerfile.alpine index b04d1ba3..2a220559 100644 --- a/dashboard/Dockerfile.alpine +++ b/dashboard/Dockerfile.alpine @@ -24,7 +24,8 @@ RUN set -x \ && apk add --no-cache --virtual .builddeps git \ && git clone https://github.com/apache/apisix-dashboard.git -b ${APISIX_DASHBOARD_TAG} /usr/local/apisix-dashboard \ && cd /usr/local/apisix-dashboard && git clean -Xdf \ - && rm -f ./.githash && git log --pretty=format:"%h" -1 > ./.githash + && rm -f ./.githash && git log --pretty=format:"%h" -1 > ./.githash \ + && rm /usr/local/openresty/bin/etcdctl FROM --platform=$BUILDPLATFORM golang:1.19 as api-builder diff --git a/dashboard/Dockerfile.centos b/dashboard/Dockerfile.centos index 24d14635..a3710ef2 100644 --- a/dashboard/Dockerfile.centos +++ b/dashboard/Dockerfile.centos @@ -24,7 +24,8 @@ RUN set -x \ && apk add --no-cache --virtual .builddeps git \ && git clone https://github.com/apache/apisix-dashboard.git -b ${APISIX_DASHBOARD_TAG} /usr/local/apisix-dashboard \ && cd /usr/local/apisix-dashboard && git clean -Xdf \ - && rm -f ./.githash && git log --pretty=format:"%h" -1 > ./.githash + && rm -f ./.githash && git log --pretty=format:"%h" -1 > ./.githash \ + && rm /usr/local/openresty/bin/etcdctl FROM --platform=$BUILDPLATFORM golang:1.19 as api-builder diff --git a/debian-dev/Dockerfile b/debian-dev/Dockerfile index 59df830f..9082cfb4 100644 --- a/debian-dev/Dockerfile +++ b/debian-dev/Dockerfile @@ -51,7 +51,8 @@ ENV DEBIAN_FRONTEND noninteractive RUN apt-get -y update --fix-missing \ && apt-get install -y \ libldap2-dev \ - && apt-get remove --purge --auto-remove -y + && apt-get remove --purge --auto-remove -y \ + && rm /usr/local/openresty/bin/etcdctl WORKDIR /usr/local/apisix diff --git a/debian-dev/Dockerfile.local b/debian-dev/Dockerfile.local index c861088d..0207190a 100644 --- a/debian-dev/Dockerfile.local +++ b/debian-dev/Dockerfile.local @@ -59,7 +59,8 @@ RUN set -x \ && luarocks config variables.OPENSSL_INCDIR /usr/include/ \ && luarocks config variables.PCRE_DIR /usr/local/openresty/pcre \ && luarocks install rockspec/apisix-master-0.rockspec --tree=/usr/local/apisix/deps --deps-only \ - && mkdir /usr/local/apisix/logs && touch /usr/local/apisix/logs/error.log && touch /usr/local/apisix/logs/access.log + && mkdir /usr/local/apisix/logs && touch /usr/local/apisix/logs/error.log && touch /usr/local/apisix/logs/access.log \ + && rm /usr/local/openresty/bin/etcdctl ENV PATH=$PATH:/usr/local/openresty-debug/luajit/bin:/usr/local/openresty-debug/nginx/sbin:/usr/local/openresty-debug/bin