You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by we...@apache.org on 2020/06/16 09:45:33 UTC

[incubator-apisix-docker] branch master updated: add dir for master dev branch. (#57)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new a9b25f2  add dir for master dev branch. (#57)
a9b25f2 is described below

commit a9b25f2857c5cca4daa2422d95a50ac921aa97ed
Author: Wen Ming <mo...@gmail.com>
AuthorDate: Tue Jun 16 17:45:27 2020 +0800

    add dir for master dev branch. (#57)
---
 alpine-dev/Dockerfile | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/alpine-dev/Dockerfile b/alpine-dev/Dockerfile
new file mode 100644
index 0000000..7afced1
--- /dev/null
+++ b/alpine-dev/Dockerfile
@@ -0,0 +1,38 @@
+FROM openresty/openresty:alpine-fat AS production-stage
+
+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 install https://github.com/apache/incubator-apisix/raw/master/rockspec/apisix-master-0.rockspec --tree=/usr/local/apisix/deps \
+    && cp -v /usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/master-0/bin/apisix /usr/bin/ \
+    && bin='#! /usr/local/openresty/luajit/bin/luajit\npackage.path = "/usr/local/apisix/?.lua;" .. package.path' \
+    && sed -i "1s@.*@$bin@" /usr/bin/apisix \
+    && 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