This is an automated email from the ASF dual-hosted git repository.

spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-docker.git


The following commit(s) were added to refs/heads/master by this push:
     new 3dc527c  fix(alpine): missing openldap (#278)
3dc527c is described below

commit 3dc527ccfffee9be48aa3bd4508bae59ce218f06
Author: 罗泽轩 <[email protected]>
AuthorDate: Mon Feb 7 14:20:47 2022 +0800

    fix(alpine): missing openldap (#278)
---
 .github/workflows/apisix-docker-test.yaml | 9 ++++++---
 Makefile                                  | 8 ++++++++
 alpine-dev/Dockerfile                     | 7 ++++++-
 alpine-local/Dockerfile                   | 7 ++++++-
 alpine/Dockerfile                         | 7 ++++++-
 5 files changed, 32 insertions(+), 6 deletions(-)

diff --git a/.github/workflows/apisix-docker-test.yaml 
b/.github/workflows/apisix-docker-test.yaml
index 1f5c56f..34d28fe 100644
--- a/.github/workflows/apisix-docker-test.yaml
+++ b/.github/workflows/apisix-docker-test.yaml
@@ -17,6 +17,7 @@ jobs:
           - alpine
           - centos
           - alpine-local
+          - alpine-dev
 
     runs-on: ubuntu-latest
     env:
@@ -28,7 +29,7 @@ jobs:
       - name: Clone apisix for local test
         if: ${{ matrix.platform == 'alpine-local' }}
         run: |
-          git clone http://github.com/apache/apisix apisix-local
+          git clone --depth 1 http://github.com/apache/apisix apisix-local
 
       - name: Build and run
         run: |
@@ -39,6 +40,8 @@ jobs:
 
       - name: Test
         run: |
+          grep -C 3 '\[error\]' example/apisix_log/error.log && exit 1
+
           curl http://127.0.0.1:9080/apisix/admin/routes/1 \
           -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
             {
@@ -58,12 +61,12 @@ jobs:
           fi
 
       - name: Tar Image
-        if: ${{ !endsWith(matrix.platform, 'local') }}
+        if: ${{ !endsWith(matrix.platform, '-local') && 
!endsWith(matrix.platform, '-dev')  }}
         run: |
           make save-${{ matrix.platform }}-tar
 
       - name: Upload Image
-        if: ${{ !endsWith(matrix.platform, 'local') }}
+        if: ${{ !endsWith(matrix.platform, '-local') && 
!endsWith(matrix.platform, '-dev')  }}
         uses: actions/upload-artifact@v2
         with:
           path: ./package
diff --git a/Makefile b/Makefile
index 7d3b6d4..b46720f 100644
--- a/Makefile
+++ b/Makefile
@@ -76,6 +76,14 @@ build-on-alpine:
        @$(call func_echo_success_status, "$@ -> [ Done ]")
 
 
+### build-on-alpine-dev : Build apache/apisix:xx-alpine-dev image
+.PHONY: build-on-alpine-dev
+build-on-alpine-dev:
+       @$(call func_echo_status, "$@ -> [ Start ]")
+       $(ENV_DOCKER) build -t $(ENV_APISIX_IMAGE_TAG_NAME)-alpine-dev -f 
./alpine-dev/Dockerfile .
+       @$(call func_echo_success_status, "$@ -> [ Done ]")
+
+
 ### build-on-alpine-local : Build apache/apisix:xx-alpine-local image
 # Actually it is not build on certain version but on local code
 # Use this name (in the same patterns with others) for convenient CI
diff --git a/alpine-dev/Dockerfile b/alpine-dev/Dockerfile
index c5a284d..51fa66a 100644
--- a/alpine-dev/Dockerfile
+++ b/alpine-dev/Dockerfile
@@ -41,7 +41,12 @@ RUN set -x \
     && cp -v 
/usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/master-0/bin/apisix 
/usr/bin/ \
     && mv /usr/local/apisix/deps/share/lua/5.1/apisix /usr/local/apisix \
     && apk del .builddeps \
-    && apk add --no-cache bash libstdc++ curl tzdata \
+    && apk add --no-cache \
+        bash \
+        curl \
+        libstdc++ \
+        openldap \
+        tzdata \
     # forward request and error logs to docker log collector
     && ln -sf /dev/stdout /usr/local/apisix/logs/access.log \
     && ln -sf /dev/stderr /usr/local/apisix/logs/error.log
diff --git a/alpine-local/Dockerfile b/alpine-local/Dockerfile
index a625c70..b6b6fc3 100644
--- a/alpine-local/Dockerfile
+++ b/alpine-local/Dockerfile
@@ -47,7 +47,12 @@ ARG ENABLE_PROXY
 # add runtime for Apache APISIX
 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 bash libstdc++ curl tzdata openldap-dev
+    && apk add --no-cache \
+        bash \
+        curl \
+        libstdc++ \
+        openldap \
+        tzdata
 
 WORKDIR /usr/local/apisix
 
diff --git a/alpine/Dockerfile b/alpine/Dockerfile
index 616c755..82d7e5e 100644
--- a/alpine/Dockerfile
+++ b/alpine/Dockerfile
@@ -46,7 +46,12 @@ RUN set -x \
     && (function ver_lt { [ "$1" = "$2" ] && return 1 || [ "$1" = "`echo -e 
"$1\n$2" | sort -V | head -n1`" ]; };  if [ "$APISIX_VERSION" = "master" ] || 
ver_lt 2.2.0 $APISIX_VERSION; 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 \
-    && apk add --no-cache bash libstdc++ curl tzdata \
+    && apk add --no-cache \
+        bash \
+        curl \
+        libstdc++ \
+        openldap \
+        tzdata \
     # forward request and error logs to docker log collector
     && ln -sf /dev/stdout /usr/local/apisix/logs/access.log \
     && ln -sf /dev/stderr /usr/local/apisix/logs/error.log

Reply via email to