Skip to content

Commit a9b25f2

Browse files
authored
add dir for master dev branch. (#57)
1 parent f4cdbf9 commit a9b25f2

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

alpine-dev/Dockerfile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
FROM openresty/openresty:alpine-fat AS production-stage
2+
3+
RUN set -x \
4+
&& /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories \
5+
&& apk add --no-cache --virtual .builddeps \
6+
automake \
7+
autoconf \
8+
libtool \
9+
pkgconfig \
10+
cmake \
11+
git \
12+
&& luarocks install https://github.com/apache/incubator-apisix/raw/master/rockspec/apisix-master-0.rockspec --tree=/usr/local/apisix/deps \
13+
&& cp -v /usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/master-0/bin/apisix /usr/bin/ \
14+
&& bin='#! /usr/local/openresty/luajit/bin/luajit\npackage.path = "/usr/local/apisix/?.lua;" .. package.path' \
15+
&& sed -i "1s@.*@$bin@" /usr/bin/apisix \
16+
&& mv /usr/local/apisix/deps/share/lua/5.1/apisix /usr/local/apisix \
17+
&& apk del .builddeps build-base make unzip
18+
19+
FROM alpine:3.11 AS last-stage
20+
21+
# add runtime for Apache APISIX
22+
RUN set -x \
23+
&& /bin/sed -i 's,http://dl-cdn.alpinelinux.org,https://mirrors.aliyun.com,g' /etc/apk/repositories \
24+
&& apk add --no-cache bash libstdc++ curl
25+
26+
WORKDIR /usr/local/apisix
27+
28+
COPY --from=production-stage /usr/local/openresty/ /usr/local/openresty/
29+
COPY --from=production-stage /usr/local/apisix/ /usr/local/apisix/
30+
COPY --from=production-stage /usr/bin/apisix /usr/bin/apisix
31+
32+
ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin
33+
34+
EXPOSE 9080 9443
35+
36+
CMD ["sh", "-c", "/usr/bin/apisix init && /usr/bin/apisix init_etcd && /usr/local/openresty/bin/openresty -p /usr/local/apisix -g 'daemon off;'"]
37+
38+
STOPSIGNAL SIGQUIT

0 commit comments

Comments
 (0)