Skip to content

Commit

Permalink
fix(docker): Use same same Lua version in container as SILE
Browse files Browse the repository at this point in the history
  • Loading branch information
alerque committed Sep 26, 2024
1 parent 7fd5877 commit 8d58fbd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,18 @@ ARG RUNTIME_DEPS
# Install run-time dependencies
RUN pacman --needed --noconfirm -Sq $RUNTIME_DEPS && yes | pacman -Sccq

# Setup LuaRocks for use with LuaJIT roughly matching SILE's internal VM
RUN luarocks --lua-version 5.1 config lua_interpreter luajit && \
luarocks --lua-version 5.1 config variables.LUA "$(command -v luajit)"

# Set at build time, forces Docker’s layer caching to reset at this point
ARG REVISION
ARG VERSION

# Install fontproof in SILE container
COPY ./ /src
WORKDIR /src
RUN luarocks make fontproof-dev-1.rockspec
RUN luarocks --lua-version 5.1 make fontproof-dev-1.rockspec

LABEL org.opencontainers.image.title="FontProof"
LABEL org.opencontainers.image.description="A containerized version of FontProof"
Expand Down
4 changes: 4 additions & 0 deletions fontproof-dev-1.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ dependencies = {
"lua_cliargs == 3.0-2"
}

deploy = {
wrap_bin_scripts = true,
}

build = {
type = "builtin",
modules = {
Expand Down
2 changes: 1 addition & 1 deletion hooks/build
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ set -e

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

RUNTIME_DEPS='luarocks words'
RUNTIME_DEPS='luarocks luajit words'

: "${DOCKER_BUILDKIT:=1}"
export DOCKER_BUILDKIT
Expand Down

0 comments on commit 8d58fbd

Please sign in to comment.