Skip to content

Commit

Permalink
remove etcdctl from remaining images
Browse files Browse the repository at this point in the history
  • Loading branch information
shreemaan-abhishek committed Sep 27, 2023
1 parent 9561393 commit b9fde5b
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion all-in-one/apisix-dashboard/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion all-in-one/apisix/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion dashboard/Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion dashboard/Dockerfile.centos
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion debian-dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion debian-dev/Dockerfile.local
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit b9fde5b

Please sign in to comment.