-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
44 lines (39 loc) · 1.17 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM zot24/openresty
MAINTAINER Israel Sotomayor <[email protected]>
ENV LUAROCKS_SRC_SHA1=5f1e1658ef8c7c9710fbc751cad79eb69ae2a891 \
LUAROCKS_VERSION=2.3.0
RUN set -ex \
&& apk --no-cache add --virtual .build-dependencies \
curl \
make \
musl-dev \
gcc \
ncurses-dev \
openssl-dev \
pcre-dev \
perl \
readline-dev \
zlib-dev \
\
&& curl -sSL http://keplerproject.github.io/luarocks/releases/luarocks-${LUAROCKS_VERSION}.tar.gz -o /tmp/luarocks.tar.gz \
\
&& cd /tmp \
&& echo "${LUAROCKS_SRC_SHA1} *luarocks.tar.gz" | sha1sum -c - \
&& tar -xzf luarocks.tar.gz \
\
&& cd luarocks-* \
&& ./configure \
--prefix=${OPENRESTY_PREFIX}/luajit \
--lua-suffix=${LUA_SUFFIX} \
--with-lua=${OPENRESTY_PREFIX}/luajit \
--with-lua-lib=${OPENRESTY_PREFIX}/luajit/lib \
--with-lua-include=${OPENRESTY_PREFIX}/luajit/include/luajit-${LUAJIT_VERSION} \
&& make build \
&& make install \
\
&& rm -rf /tmp/luarocks-* \
&& apk del .build-dependencies \
&& rm -rf ~/.cache/luarocks
RUN ln -sf ${OPENRESTY_PREFIX}/luajit/bin/luarocks /usr/local/bin/luarocks
RUN apk --no-cache add unzip
WORKDIR $NGINX_PREFIX