From 0a0a42ae1c81f21a03c98a991b707dba6b724364 Mon Sep 17 00:00:00 2001 From: JinChen <36916582+Jaycean@users.noreply.github.com> Date: Wed, 3 Feb 2021 14:19:00 +0800 Subject: [PATCH] fix(be): CI uses the apisix-docker project dockerfile to build apisix (#1416) --- api/test/docker/Dockerfile-apisix | 58 ----------------------------- api/test/docker/docker-compose.yaml | 8 ++-- 2 files changed, 4 insertions(+), 62 deletions(-) delete mode 100644 api/test/docker/Dockerfile-apisix diff --git a/api/test/docker/Dockerfile-apisix b/api/test/docker/Dockerfile-apisix deleted file mode 100644 index 35759cb1c0..0000000000 --- a/api/test/docker/Dockerfile-apisix +++ /dev/null @@ -1,58 +0,0 @@ -# -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -FROM openresty/openresty:alpine-fat AS production-stage - -ARG APISIX_VERSION=master -LABEL apisix_version="${APISIX_VERSION}" - -RUN set -x \ - && /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 \ - git \ - && luarocks config variables.OPENSSL_LIBDIR /usr/local/openresty/openssl/lib \ - && luarocks config variables.OPENSSL_INCDIR /usr/local/openresty/openssl/include \ - && luarocks install https://github.com/apache/apisix/raw/master/rockspec/apisix-${APISIX_VERSION}-0.rockspec --tree=/usr/local/apisix/deps \ - && cp -v /usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/${APISIX_VERSION}-0/bin/apisix /usr/bin/ \ - && mv /usr/local/apisix/deps/share/lua/5.1/apisix /usr/local/apisix \ - && apk del .builddeps build-base make unzip - -FROM alpine:3.11 AS last-stage - -# add runtime for Apache APISIX -RUN set -x \ - && /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories \ - && apk add --no-cache bash libstdc++ curl - -WORKDIR /usr/local/apisix - -COPY --from=production-stage /usr/local/openresty/ /usr/local/openresty/ -COPY --from=production-stage /usr/local/apisix/ /usr/local/apisix/ -COPY --from=production-stage /usr/bin/apisix /usr/bin/apisix - -ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin - -EXPOSE 9080 9443 - -CMD ["sh", "-c", "/usr/bin/apisix init && /usr/bin/apisix init_etcd && /usr/local/openresty/bin/openresty -p /usr/local/apisix -g 'daemon off;'"] - -STOPSIGNAL SIGQUIT diff --git a/api/test/docker/docker-compose.yaml b/api/test/docker/docker-compose.yaml index e5762c8bc6..159e26a12e 100644 --- a/api/test/docker/docker-compose.yaml +++ b/api/test/docker/docker-compose.yaml @@ -128,8 +128,8 @@ services: apisix: hostname: apisix_server1 build: - context: ../../ - dockerfile: test/docker/Dockerfile-apisix + context: https://github.com/apache/apisix-docker.git#master:alpine-dev/ + dockerfile: Dockerfile args: - APISIX_VERSION=master restart: always @@ -153,8 +153,8 @@ services: apisix2: hostname: apisix_server2 build: - context: ../../ - dockerfile: test/docker/Dockerfile-apisix + context: https://github.com/apache/apisix-docker.git#master:alpine-dev/ + dockerfile: Dockerfile args: - APISIX_VERSION=master restart: always