moonming commented on a change in pull request #45:
URL:
https://github.com/apache/incubator-apisix-docker/pull/45#discussion_r415786593
##########
File path: alpine/Dockerfile
##########
@@ -1,24 +1,57 @@
- FROM openresty/openresty:alpine-fat
+FROM node:10-alpine3.11 AS build-stage
+
+ARG APISIX_VERSION=1.1
Review comment:
the version should be 1.2
##########
File path: alpine/Dockerfile
##########
@@ -1,24 +1,57 @@
- FROM openresty/openresty:alpine-fat
+FROM node:10-alpine3.11 AS build-stage
+
+ARG APISIX_VERSION=1.1
+
+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 .build-deps git \
+ && git clone -b v${APISIX_VERSION}
https://github.com/apache/incubator-apisix.git /tmp/apisix \
+ && cd /tmp/apisix \
+ && git submodule init \
+ && git submodule update \
+ && cd dashboard \
+ && yarn && yarn build:prod
+
+FROM openresty/openresty:alpine-fat AS production-stage
ARG APISIX_VERSION=1.1
Review comment:
the 1.1 version not has dashbaord. So I think build will break.
##########
File path: alpine/Dockerfile
##########
@@ -1,24 +1,57 @@
- FROM openresty/openresty:alpine-fat
+FROM node:10-alpine3.11 AS build-stage
+
+ARG APISIX_VERSION=1.1
+
+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 .build-deps git \
+ && git clone -b v${APISIX_VERSION}
https://github.com/apache/incubator-apisix.git /tmp/apisix \
+ && cd /tmp/apisix \
+ && git submodule init \
+ && git submodule update \
+ && cd dashboard \
+ && yarn && yarn build:prod
+
+FROM openresty/openresty:alpine-fat AS production-stage
ARG APISIX_VERSION=1.1
LABEL apisix_version="${APISIX_VERSION}"
-RUN apk add --no-cache --virtual .builddeps \
+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-${APISIX_VERSION}-0.rockspec
--tree=/usr/local/apisix/deps \
- && cp
/usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/${APISIX_VERSION}-0/bin/apisix
/usr/bin/ \
- && bin='#! /usr/local/openresty/luajit/bin/luajit\npackage.path =
"/usr/local/apisix/lua/?.lua;" .. package.path' \
+ && cp -v
/usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/${APISIX_VERSION}-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/lua /usr/local/apisix \
- && apk del .builddeps
+ && 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
Review comment:
`Apisix` -> `APISIX`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]