-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
60 lines (40 loc) · 1.2 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
FROM alpine:3.18
ENV LUA_MAJOR_VERSION 5.1
ENV LUA_MINOR_VERSION 5
ENV LUA_VERSION ${LUA_MAJOR_VERSION}.${LUA_MINOR_VERSION}
# Dependencies
RUN apk update && apk add --update make tar unzip gcc openssl-dev readline-dev curl libc-dev
RUN apk add wget # Needed due to https://github.com/luarocks/luarocks/issues/952
RUN curl -L http://www.lua.org/ftp/lua-${LUA_VERSION}.tar.gz | tar xzf -
WORKDIR /lua-$LUA_VERSION
# build lua
RUN make linux test
RUN make install
WORKDIR /
# lua env
ENV WITH_LUA /usr/local/
ENV LUA_LIB /usr/local/lib/lua
ENV LUA_INCLUDE /usr/local/include
RUN rm /lua-$LUA_VERSION -rf
ENV LUAROCKS_VERSION 3.9.2
ENV LUAROCKS_INSTALL luarocks-$LUAROCKS_VERSION
ENV TMP_LOC /tmp/luarocks
# Build Luarocks
RUN curl -OL \
https://luarocks.org/releases/${LUAROCKS_INSTALL}.tar.gz
RUN tar xzf $LUAROCKS_INSTALL.tar.gz && \
mv $LUAROCKS_INSTALL $TMP_LOC && \
rm $LUAROCKS_INSTALL.tar.gz
WORKDIR $TMP_LOC
RUN ./configure \
--with-lua=$WITH_LUA \
--with-lua-include=$LUA_INCLUDE \
--with-lua-lib=$LUA_LIB
RUN make build
RUN make install
WORKDIR /
RUN rm $TMP_LOC -rf
WORKDIR /mnt/luarocks
RUN apk add 'neovim>0.9'
ENV BUSTED_VERSION 2.1.2-3
RUN luarocks install busted $BUSTED_VERSION