-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
49 lines (37 loc) · 1.77 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
# SPDX-FileCopyrightText: © 2016 SIL International
# SPDX-License-Identifier: MIT
#syntax=docker/dockerfile:1.2
ARG SILETAG
FROM ghcr.io/sile-typesetter/sile:$SILETAG AS fontproof
# This is a hack to convince Docker Hub that its cache is behind the times.
# This happens when the contents of our dependencies changes but the base
# system hasn’t been refreshed. It’s helpful to have this as a separate layer
# because it saves a lot of time for local builds, but it does periodically
# need a poke. Incrementing this when changing dependencies or just when the
# remote Docker Hub builds die should be enough.
ARG DOCKER_HUB_CACHE=0
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 config lua_version 5.1 && \
luarocks config lua_interpreter luajit && \
luarocks 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
LABEL org.opencontainers.image.title="FontProof"
LABEL org.opencontainers.image.description="A containerized version of FontProof"
LABEL org.opencontainers.image.authors="Caleb Maclennan <[email protected]>"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.url="https://github.com/sile-typesetter/fontproof/pkgs/container/fontproof"
LABEL org.opencontainers.image.source="https://github.com/sile-typesetter/fontproof"
LABEL org.opencontainers.image.version="v$VERSION"
LABEL org.opencontainers.image.revision="$REVISION"
RUN fontproof --version
WORKDIR /data
ENTRYPOINT ["fontproof"]