forked from Linaro/squad
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
79 lines (72 loc) · 2.23 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
FROM debian:buster-slim
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -q=2 && \
apt-get install -q=2 --no-install-recommends iproute2 auto-apt-proxy && \
apt-get install -q=2 --no-install-recommends \
python3 \
python3-celery \
python3-coreapi \
python3-cryptography \
python3-dateutil \
python3-dev \
python3-django \
python3-django-auth-ldap \
python3-django-cors-headers \
python3-django-celery-results \
python3-django-crispy-forms \
python3-django-filters \
python3-django-simple-history \
python3-djangorestframework \
python3-djangorestframework-filters \
python3-djangorestframework-extensions \
python3-future \
python3-gunicorn \
python3-jinja2 \
python3-markdown \
python3-msgpack \
python3-pip \
python3-psycopg2 \
python3-requests \
python3-setuptools \
python3-sqlparse \
python3-svgwrite \
python3-wheel \
python3-whitenoise \
python3-yaml \
python3-zmq \
fail2ban \
gettext \
git \
libdbd-pg-perl \
libldap2-dev \
libpq-dev \
libyaml-dev \
moreutils \
postgresql-client \
unzip \
tmux \
openssh-client
# Prepare the environment
COPY . /squad-build/
ENV SQUAD_STATIC_DIR=/app/static
RUN cd /squad-build && ./scripts/git-build && \
pip3 install --no-dependencies \
./dist/squad*.whl \
squad-linaro-plugins \
sentry-sdk==0.14.3 \
zipp \
importlib-metadata==3.1.1 \
asgiref \
django-bootstrap3 \
django-storages==1.9 && \
pip3 install boto3==1.15 && \
cd / && rm -rf /squad-build && \
mkdir -p /app/static && \
useradd -d /app squad && \
python3 -m squad.frontend && \
squad-admin collectstatic --noinput --verbosity 0 && \
squad-admin compilemessages && \
chown -R squad:squad /app
# TODO: use --ignore for `squad-admin compilemessages` to save time compiling
# messages from all installed packages: https://docs.djangoproject.com/en/3.0/ref/django-admin/#cmdoption-compilemessages-ignore
USER squad