-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (24 loc) · 780 Bytes
/
Dockerfile
File metadata and controls
43 lines (24 loc) · 780 Bytes
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
ARG PYTHON_IMAGE_VERSION=3.13
FROM python:${PYTHON_IMAGE_VERSION}-alpine AS builder
LABEL maintainer="ToshY (github.com/ToshY)"
ENV PYTHONUNBUFFERED=1
WORKDIR /build
COPY . .
RUN pip install --prefix=/install -r requirements.txt \
&& pip install --prefix=/install .
FROM python:${PYTHON_IMAGE_VERSION}-alpine AS prod
ENV PYTHONUNBUFFERED=1
WORKDIR /app
COPY --from=builder /install /usr/local
COPY --from=builder /build/site /app/site
RUN mkdir -p ./output
EXPOSE 8000
ENTRYPOINT ["qr"]
CMD ["--help"]
FROM python:${PYTHON_IMAGE_VERSION}-alpine AS dev
ENV PYTHONUNBUFFERED=1
WORKDIR /app
COPY requirements.txt requirements.dev.txt ./
RUN pip install --no-cache-dir -r requirements.txt \
&& pip install --no-cache-dir -r requirements.dev.txt
EXPOSE 8000