-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
35 lines (29 loc) · 1.41 KB
/
Copy pathDockerfile
File metadata and controls
35 lines (29 loc) · 1.41 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
35
# Single-image build: TeX Live (pdflatex) + Python in one image.
# texlive/texlive:latest ships a full TeX Live and a Python 3 interpreter,
# so refparse can both generate the .tex and compile it to PDF here.
FROM texlive/texlive:latest
LABEL maintainer="MattWellie"
# The base image ships Python 3 but neither pip nor venv, so add them.
RUN apt-get update && \
apt-get install -y --no-install-recommends python3-pip python3-venv && \
rm -rf /var/lib/apt/lists/*
# Debian's system Python is externally managed (PEP 668); install deps into a
# dedicated virtualenv so we don't fight the system package manager.
ENV VIRTUAL_ENV=/opt/venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN python3 -m venv "$VIRTUAL_ENV"
# Install the refparse package and its dependencies from the project metadata.
# pyproject.toml is the single source of truth for runtime requirements and it
# exposes the `refparse` console entry point used below.
COPY pyproject.toml README.md /build/
COPY src/ /build/src/
RUN pip install --no-cache-dir --upgrade pip setuptools && \
pip install --no-cache-dir /build && \
rm -rf /build
# control.py reads/writes the bind-mounted input/output/primers/settings dirs
# via paths relative to the working directory, so run from / where those volumes
# are mounted. The base image defaults to WORKDIR /workdir, so reset it to /.
WORKDIR /
COPY ./settings /settings/
VOLUME input output primers
ENTRYPOINT ["refparse"]