Skip to content
Permalink
Browse files
fix(alpine): missing openldap (#278)
  • Loading branch information
spacewander committed Feb 7, 2022
1 parent 108c4ad commit 3dc527ccfffee9be48aa3bd4508bae59ce218f06
Showing 5 changed files with 32 additions and 6 deletions.
@@ -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
@@ -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
@@ -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
@@ -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

@@ -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

0 comments on commit 3dc527c

Please sign in to comment.