-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
48 lines (29 loc) · 1.15 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
ARG DJANGO_CONTAINER_VERSION=2.0.2
FROM us-docker.pkg.dev/uwit-mci-axdd/containers/django-container:${DJANGO_CONTAINER_VERSION} AS app-prebundler-container
USER root
RUN apt-get update && apt-get install libpq-dev -y
USER acait
ADD --chown=acait:acait . /app/
ADD --chown=acait:acait docker/ /app/project/
ADD --chown=acait:acait docker/app_start.sh /scripts
RUN chmod u+x /scripts/app_start.sh
RUN /app/bin/pip install -r requirements.txt
RUN /app/bin/pip install psycopg2
FROM node:lts-bullseye AS node-bundler
ADD ./package.json /app/
WORKDIR /app/
RUN npm install .
ADD . /app/
ARG VUE_DEVTOOLS
ENV VUE_DEVTOOLS=$VUE_DEVTOOLS
RUN npm run build
FROM app-prebundler-container AS app-container
COPY --chown=acait:acait --from=node-bundler /app/sis_provisioner/static /app/sis_provisioner/static
RUN /app/bin/python manage.py collectstatic --noinput
FROM us-docker.pkg.dev/uwit-mci-axdd/containers/django-test-container:${DJANGO_CONTAINER_VERSION} AS app-test-container
USER root
RUN apt-get update && apt-get install libpq-dev -y
USER acait
ENV NODE_PATH=/app/lib/node_modules
COPY --from=app-container /app/ /app/
COPY --from=app-container /static/ /static/