-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
executable file
·47 lines (39 loc) · 1.21 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
FROM python:3.10.8-slim-bullseye
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get -y -q --no-install-recommends install \
git \
wget \
cabextract \
xfonts-utils \
libreoffice \
libreoffice-writer \
ure \
libreoffice-java-common \
libreoffice-core \
libreoffice-common \
fonts-indic \
fonts-noto \
fonts-noto-cjk \
fonts-arabeyes \
fonts-kacst \
fonts-freefont-ttf \
openjdk-17-jre && \
apt-get -y -q remove libreoffice-gnome && \
apt-get -y autoremove && \
rm -rf /var/lib/apt/lists/*
RUN wget http://ftp.br.debian.org/debian/pool/contrib/m/msttcorefonts/ttf-mscorefonts-installer_3.8_all.deb && \
apt --fix-broken install -y ./ttf-mscorefonts-installer_3.8_all.deb && \
rm ttf-mscorefonts-installer_3.8_all.deb && \
fc-cache -f -v
RUN mkdir -p /app/data
RUN addgroup --system python && adduser --system --group python
RUN chown -R python:python /app
USER python
ENV VIRTUAL_ENV=/app/venv
RUN python -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
WORKDIR /app
COPY ./requirements/requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade pip && pip install --no-cache-dir -r requirements.txt
COPY ./src ./src