forked from Linaro/squad
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
78 lines (72 loc) · 2.27 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
FROM debian:buster-backports
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-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 \
openssh-client && \
apt-get -t buster-backports install -q=2 --no-install-recommends \
python3-django \
python3-django-auth-ldap \
python3-django-cors-headers \
python3-django-celery-results \
python3-django-crispy-forms \
python3-django-simple-history \
python3-djangorestframework \
python3-djangorestframework-extensions && \
pip3 install --no-dependencies \
squad-linaro-plugins \
sentry-sdk==0.14.3 \
zipp \
importlib-metadata==3.1.1 \
asgiref \
django-bootstrap3 \
django-filter==2.0.0 \
djangorestframework-filters==1.0.0.dev0 \
django-storages==1.9 \
django-allauth==0.44.0 && \
pip3 install boto3==1.15
# 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 && \
cd / && rm -rf /squad-build && apt-get remove -y git && apt-get autoremove -y && \
mkdir -p /app/static && \
useradd -d /app squad && \
python3 -m squad.frontend && \
squad-admin collectstatic --noinput --verbosity 0 && \
chown -R squad:squad /app && \
cd `python3 -c 'import squad; print(squad.__path__[0])'` && squad-admin compilemessages && \
cd /app
USER squad