-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (29 loc) · 1.19 KB
/
Dockerfile
File metadata and controls
43 lines (29 loc) · 1.19 KB
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
FROM alexanderwagnerdev/alpine:builder AS builder
RUN apk update && \
apk upgrade && \
apk add --no-cache python3 py3-pip bash gettext tzdata && \
rm -rf /var/cache/apk/*
WORKDIR /app
COPY . .
RUN python3 -m venv /venv
RUN /bin/sh -c "source /venv/bin/activate && pip install --upgrade pip && pip install --no-cache-dir -r requirements.txt && python3 manage.py compilemessages && python3 manage.py collectstatic --noinput && python3 manage.py makemigrations streams"
ENV PATH="/venv/bin:$PATH"
FROM alexanderwagnerdev/alpine:latest
RUN apk update && \
apk upgrade && \
apk add --no-cache python3 tzdata && \
rm -rf /var/cache/apk/*
WORKDIR /app
COPY --from=builder /app/slspanel /app/slspanel
COPY --from=builder /app/streams /app/streams
COPY --from=builder /app/templates /app/templates
COPY --from=builder /app/locale /app/locale
COPY --from=builder /app/static /app/static
COPY --from=builder /app/staticfiles /app/staticfiles
COPY --from=builder /app/manage.py /app/manage.py
COPY --from=builder /venv /venv
ENV PATH="/venv/bin:$PATH"
EXPOSE 8000/tcp
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
CMD ["/entrypoint.sh"]