-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (20 loc) · 962 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
30
31
ARG DJANGO_CONTAINER_VERSION=1.4.1
FROM gcr.io/uwit-mci-axdd/django-container:${DJANGO_CONTAINER_VERSION} as app-container
USER root
RUN apt-get update && apt-get install mysql-client libmysqlclient-dev libpq-dev -y
USER acait
ADD --chown=acait:acait . /app/
ADD --chown=acait:acait docker/ /app/project/
RUN /app/bin/pip install -r requirements.txt
RUN /app/bin/pip install mysqlclient
RUN . /app/bin/activate && pip install nodeenv && nodeenv -p &&\
npm install -g npm &&\
./bin/npm install less -g
ADD --chown=acait:acait . /app/
ADD --chown=acait:acait docker/ project/
ADD --chown=acait:acait docker/app_start.sh /scripts
RUN chmod u+x /scripts/app_start.sh
RUN . /app/bin/activate && python manage.py compress -f && python manage.py collectstatic --noinput
FROM gcr.io/uwit-mci-axdd/django-test-container:${DJANGO_CONTAINER_VERSION} as app-test-container
COPY --from=app-container /app/ /app/
COPY --from=app-container /static/ /static/