-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (28 loc) · 989 Bytes
/
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
FROM alpine:3.18.2 as build
ENV LUA_VERSION 5.4.4
ENV LUAROCKS_VERSION 3.9.2
RUN apk add --no-cache libc-dev readline readline-dev gcc make wget
# install lua
RUN cd /tmp \
&& wget https://www.lua.org/ftp/lua-${LUA_VERSION}.tar.gz \
&& tar zxf lua-${LUA_VERSION}.tar.gz \
&& cd lua-${LUA_VERSION} \
&& make linux install
# install luarocks
RUN cd /tmp \
&& wget https://luarocks.org/releases/luarocks-${LUAROCKS_VERSION}.tar.gz \
&& tar zxf luarocks-${LUAROCKS_VERSION}.tar.gz \
&& cd luarocks-${LUAROCKS_VERSION} \
&& ./configure \
&& make build \
&& make install
RUN luarocks install luacheck
FROM alpine:3.18.2 as prod
LABEL repository="http://github.com/judaew/luacheck-action"
LABEL homepage="http://github.com/judaew/luacheck-action"
LABEL maintainer="Vadym-Valdis Yudaiev"
RUN apk add --no-cache bash
COPY --from=build /usr/local /usr/local
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x entrypoint.sh
ENTRYPOINT [ "/entrypoint.sh" ]