Skip to content

Commit 8d58fbd

Browse files
committed
fix(docker): Use same same Lua version in container as SILE
1 parent 7fd5877 commit 8d58fbd

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

Dockerfile

+5-1
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,18 @@ ARG RUNTIME_DEPS
2020
# Install run-time dependencies
2121
RUN pacman --needed --noconfirm -Sq $RUNTIME_DEPS && yes | pacman -Sccq
2222

23+
# Setup LuaRocks for use with LuaJIT roughly matching SILE's internal VM
24+
RUN luarocks --lua-version 5.1 config lua_interpreter luajit && \
25+
luarocks --lua-version 5.1 config variables.LUA "$(command -v luajit)"
26+
2327
# Set at build time, forces Docker’s layer caching to reset at this point
2428
ARG REVISION
2529
ARG VERSION
2630

2731
# Install fontproof in SILE container
2832
COPY ./ /src
2933
WORKDIR /src
30-
RUN luarocks make fontproof-dev-1.rockspec
34+
RUN luarocks --lua-version 5.1 make fontproof-dev-1.rockspec
3135

3236
LABEL org.opencontainers.image.title="FontProof"
3337
LABEL org.opencontainers.image.description="A containerized version of FontProof"

fontproof-dev-1.rockspec

+4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ dependencies = {
2727
"lua_cliargs == 3.0-2"
2828
}
2929

30+
deploy = {
31+
wrap_bin_scripts = true,
32+
}
33+
3034
build = {
3135
type = "builtin",
3236
modules = {

hooks/build

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ set -e
88

99
REVISION=$(git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g')
1010

11-
RUNTIME_DEPS='luarocks words'
11+
RUNTIME_DEPS='luarocks luajit words'
1212

1313
: "${DOCKER_BUILDKIT:=1}"
1414
export DOCKER_BUILDKIT

0 commit comments

Comments
 (0)