forked from saks/lua-resty-repl
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockfile
37 lines (33 loc) · 1.32 KB
/
Dockfile
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
FROM openresty/openresty:1.13.6.2-alpine
ARG RESTY_LUAROCKS_VERSION="2.4.4"
RUN apk add --no-cache --virtual .build-deps \
bash \
build-base \
curl \
linux-headers \
make \
unzip \
git \
&& apk add perl expect readline \
&& cd /tmp \
&& curl -fSL https://github.com/luarocks/luarocks/archive/${RESTY_LUAROCKS_VERSION}.tar.gz -o luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \
&& tar xzf luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \
&& cd luarocks-${RESTY_LUAROCKS_VERSION} \
&& ./configure \
--prefix=/usr/local/openresty/luajit \
--with-lua=/usr/local/openresty/luajit \
--lua-suffix=jit-2.1.0-beta3 \
--with-lua-include=/usr/local/openresty/luajit/include/luajit-2.1 \
&& make build \
&& make install \
&& cd /tmp \
&& luarocks install busted \
&& luarocks install luacheck \
&& luarocks install inspect \
&& luarocks install argparse \
&& luarocks install lua-hiredis-with-5.2-fix \
&& echo "#!/usr/bin/env resty" > /usr/local/bin/resty-busted \
&& echo "require 'busted.runner'({ standalone = false })" >> /usr/local/bin/resty-busted \
&& chmod +x /usr/local/bin/resty-busted \
&& rm -rf luarocks-${RESTY_LUAROCKS_VERSION} luarocks-${RESTY_LUAROCKS_VERSION}.tar.gz \
&& apk del .build-deps