-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdockerfile
29 lines (24 loc) · 1011 Bytes
/
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
FROM python:3.11-slim-buster
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get update -y && apt-get upgrade -y \
&& apt-get install -y make wget nano vim \
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*
RUN addgroup --uid 1000 styloexport
RUN adduser --disabled-login --ingroup styloexport --uid 1000 styloexport
USER styloexport:styloexport
WORKDIR /usr/stylo-export
ENV VIRTUAL_ENV=/usr/stylo-export/venv
RUN python -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN mkdir ./static ./tmp
RUN pip install gunicorn
COPY --chown=styloexport:styloexport Makefile setup.* .
COPY --chown=styloexport:styloexport styloexport ./styloexport
COPY --chown=styloexport:styloexport templates ./templates
COPY --chown=styloexport:styloexport styles ./styles
COPY --chown=pandocapi:pandocapi README.md ./README.md
COPY --chown=pandocapi:pandocapi pyproject.toml ./pyproject.toml
RUN make install
COPY --chown=styloexport:styloexport .envdocker ./.env
EXPOSE 8001
CMD ["make", "production"]