-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (29 loc) · 1022 Bytes
/
Dockerfile
File metadata and controls
38 lines (29 loc) · 1022 Bytes
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
FROM python:3.10-slim
ENV PATH /usr/local/bin:$PATH
ENV DEBIAN_FRONTEND noninteractive
ENV PYTHONUNBUFFERED=True \
APP_HOME=/app \
PORT=5000
WORKDIR $APP_HOME
COPY . ./
RUN apt-get update && apt-get install -y apt-utils
RUN apt-get install -yqq wget unzip curl nano
RUN apt-get purge -y --auto-remove ca-certificates wget
RUN set -x \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
wget \
libreoffice \
default-jre \
libreoffice-java-common \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get libreoffice --version
# Install Python dependencies
RUN pip install --upgrade pip && \
pip install --no-cache-dir -r requirements.txt
# Install unoserver in libreoffice phyton version
RUN pip install virtualenv
RUN mkdir /environments
RUN virtualenv --python=/usr/bin/python3 --system-site-packages /environments/virtenv
RUN /environments/virtenv/bin/pip install unoserver
CMD exec gunicorn --bind :$PORT --workers 1 --threads 8 --timeout 0 main:app