-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
52 lines (43 loc) · 1.29 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
50
51
52
FROM alpine:3.12.0
ENTRYPOINT ["octool"]
CMD ["--help"]
# Create an "octool" user.
RUN adduser -D -H -h /data -s /bin/bash octool && \
mkdir /data && \
chown octool /data
# Writable directory for TeX.
# The directory is configured by config option `TEXMFHOME` when TeX is built.
# TeX tries to write to:
# - TEXMFSYSVAR (/usr/share/texmf-var on Alpine, but it is owned by root)
# - ${HOME}/.texlive*
ENV HOME /data
VOLUME /data
# Pandoc writes to /tmp by default.
VOLUME /tmp
RUN apk add --no-cache \
-X http://dl-cdn.alpinelinux.org/alpine/v3.11/main \
-X http://dl-cdn.alpinelinux.org/alpine/v3.11/community \
-X http://dl-cdn.alpinelinux.org/alpine/edge/main \
-X http://dl-cdn.alpinelinux.org/alpine/edge/community \
-X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
bash \
git \
'pandoc>=2.9' \
py3-pip \
python3-dev \
'ruby>=2.4' \
ruby-etc \
ruby-io-console \
ruby-irb \
texlive-full \
&& :
# Pygments for syntax highlighting.
COPY src/requirements.txt /src/
RUN pip3 install --no-cache -r /src/requirements.txt
COPY Dockerfile /src/
COPY example-inputs /example-inputs
COPY standards /standards
ARG OCTOOL_VERSION
COPY src/pkg/octool-${OCTOOL_VERSION}.gem /octool/
RUN gem install /octool/octool-${OCTOOL_VERSION}.gem
USER octool