-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (29 loc) · 1.36 KB
/
Dockerfile
File metadata and controls
34 lines (29 loc) · 1.36 KB
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
FROM alpine:latest
# Build arguments
ARG BUILD_DATE
ARG VCS_REF
ARG LUA_VERSION
# Set metadata labels
LABEL org.opencontainers.image.created="${BUILD_DATE}" \
org.opencontainers.image.revision="${VCS_REF}" \
org.opencontainers.image.version="${LUA_VERSION}" \
org.opencontainers.image.authors="Evan Darwin <[email protected]>" \
org.opencontainers.image.url="https://github.com/evandarwin/lua-docker" \
org.opencontainers.image.documentation="https://github.com/evandarwin/lua-docker/blob/main/README.md" \
org.opencontainers.image.description="Lua with LuaRocks container image"
ENV AUTHOR="Evan Darwin <[email protected]>"
# Lua and LuaRocks versions (can be overridden at build time)
ENV VERSION_LUA="${LUA_VERSION:-5.4.7}"
ENV VERSION_LUAROCKS="${LUAROCKS_VERSION:-3.11.1}"
RUN apk add --no-cache libc-dev readline readline-dev unzip make gcc coreutils wget && \
cd /tmp/ && \
wget -O lua.tar.gz https://www.lua.org/ftp/lua-${VERSION_LUA}.tar.gz && \
tar -zxvf lua.tar.gz && \
cd lua-${VERSION_LUA} && \
make linux install && \
cd /tmp/ && \
wget -O luarocks.tar.gz https://luarocks.org/releases/luarocks-${VERSION_LUAROCKS}.tar.gz && \
tar zxpf luarocks.tar.gz && cd \
luarocks-${VERSION_LUAROCKS} && \
./configure && make build && make install && \
rm -rf /tmp/lua*