-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (25 loc) · 744 Bytes
/
Copy pathDockerfile
File metadata and controls
32 lines (25 loc) · 744 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
FROM python:3.10-slim-buster
WORKDIR /web-project
COPY setup.cfg .
COPY setup.py .
RUN groupadd -r web && useradd -r -g web web
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
gcc \
libpq-dev \
python-dev \
&& pip install .[apispec,testing,admin,scheduler] \
&& apt-get purge -y --auto-remove gcc python-dev \
&& apt-get -y autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY starlette_web ./starlette_web
COPY etc/run_tests.sh .
COPY .coveragerc .
COPY .flake8 .
RUN chown -R web:web /web-project
RUN mkdir -p static
ENV STARLETTE_SETTINGS_MODULE=starlette_web.core.settings
COPY command.py .
RUN python command.py collectstatic
ENTRYPOINT ["/bin/sh", "/web-project/run_tests.sh"]