forked from lardbit/nefarious
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (29 loc) · 1.1 KB
/
Dockerfile
File metadata and controls
36 lines (29 loc) · 1.1 KB
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
FROM python:3.9.9-bullseye
EXPOSE 80
# add main app
ADD src /app
# add entrypoints
ADD entrypoint*.sh /app/
WORKDIR /app
ENV DEBIAN_FRONTEND=noninteractive
# install app dependencies, build app and remove dev dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
authbind \
libatlas-base-dev libhdf5-dev libavutil-dev libswresample-dev libavcodec-dev libavformat-dev libswscale-dev \
&& curl -sL https://deb.nodesource.com/setup_16.x | bash - \
&& apt-get install nodejs -y \
&& npm --prefix frontend install \
&& npm --prefix frontend run build-prod \
&& mkdir -p staticassets \
&& mkdir -p /nefarious-db \
&& python -m venv /env \
&& /env/bin/pip install -U pip \
&& /env/bin/pip install --no-cache-dir --only-binary :all: --extra-index-url https://www.piwheels.org/simple -r requirements.txt \
&& /env/bin/python manage.py collectstatic --no-input \
&& rm -rf frontend/node_modules \
&& apt-get remove -y \
nodejs \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* \
&& true
ENTRYPOINT ["/app/entrypoint.sh"]