-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
executable file
·29 lines (20 loc) · 1015 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
ARG DJANGO_CONTAINER_VERSION=1.4.2
FROM us-docker.pkg.dev/uwit-mci-axdd/containers/django-container:${DJANGO_CONTAINER_VERSION} as app-container
USER root
RUN apt-get update && apt-get install mysql-client libmysqlclient-dev -y
COPY docker/locations.conf /etc/nginx/includes/locations.conf
USER acait
ADD --chown=acait:acait scout/VERSION /app/scout/
ADD --chown=acait:acait setup.py /app/
ADD --chown=acait:acait requirements.txt /app/
RUN /app/bin/pip install -r requirements.txt
RUN . /app/bin/activate && pip install mysqlclient
ADD --chown=acait:acait . /app/
ADD --chown=acait:acait docker/ project/
RUN . /app/bin/activate && pip install nodeenv && nodeenv -p &&\
npm install -g npm && ./bin/npm install less -g
RUN . /app/bin/activate && python manage.py collectstatic --noinput &&\
python manage.py compress -f
FROM us-docker.pkg.dev/uwit-mci-axdd/containers/django-test-container:${DJANGO_CONTAINER_VERSION} as app-test-container
COPY --from=0 /app/ /app/
COPY --from=0 /static/ /static/