-
Notifications
You must be signed in to change notification settings - Fork 3
/
Containerfile.django
42 lines (35 loc) · 1.16 KB
/
Containerfile.django
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
# SPDX-License-Identifier: FSFAP
# Copyright (C) 2023 Edith Coates
# Copyright (C) 2023 Colin B. Macdonald
# Copyright (C) 2023 Natalie Balashov
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.
# Pull base image
FROM python:3.10.2-slim-bullseye
# Set environment variables
ENV PIP_DISABLE_PIP_VERSION_CHECK 1
ENV PYTHONUNBUFFERED 1
ENV PLOM_DATABASE_HOSTNAME postgres
# base OS dependencies
RUN apt-get -y update && \
apt-get --no-install-recommends -y install \
cmake gcc build-essential git \
dvipng latexmk texlive-latex-extra texlive-fonts-recommended texlive-pictures \
&& \
apt-get -yq autoclean
# Set work directory
WORKDIR /src
COPY . /src
# RUN pip install --no-cache-dir -r requirements.txt
# RUN pip install --no-cache-dir .
RUN pip install --no-cache-dir --no-deps .
# Set work directory
WORKDIR /code
# Install dependencies
COPY ./requirements.txt.django .
RUN pip install --no-cache-dir -r requirements.txt.django
# Copy project
COPY plom_server/ .