forked from Flexget/Flexget
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (37 loc) · 1.5 KB
/
Copy pathDockerfile
File metadata and controls
45 lines (37 loc) · 1.5 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
44
45
FROM docker.io/python:3.11-alpine@sha256:9ce54d7ed458f71129c977478dd106cf6165a49b73fa38c217cc54de8f3e2bd0 AS builder
ENV PYTHONUNBUFFERED=1
RUN --mount=type=cache,target=/var/cache/apk \
apk add --upgrade \
ca-certificates \
nodejs \
build-base \
libffi-dev \
openssl-dev \
unzip
COPY --from=ghcr.io/astral-sh/uv:0.8.2@sha256:a7999d42cba0e5af47ef3c06ac310229c7f29c5314e35902f8353e8e170eeed1 /uv /uvx /bin/
ENV UV_COMPILE_BYTECODE=1 UV_LINK_MODE=copy
WORKDIR /flexget
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=scripts/bundle_webui.py,target=scripts/bundle_webui.py \
uv run scripts/bundle_webui.py
RUN --mount=type=cache,target=/root/.cache/uv \
--mount=type=bind,source=uv.lock,target=uv.lock \
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
uv sync --frozen --no-dev --group=all --no-install-project
ADD . /flexget
RUN --mount=type=cache,target=/root/.cache/uv \
uv sync --frozen --no-dev --group=all
FROM docker.io/python:3.11-alpine@sha256:9ce54d7ed458f71129c977478dd106cf6165a49b73fa38c217cc54de8f3e2bd0
ENV PYTHONUNBUFFERED=1
RUN --mount=type=cache,target=/var/cache/apk \
apk add --upgrade \
ca-certificates \
nodejs \
tzdata
# Copy the application from the builder
COPY --from=builder --chown=app:app /flexget /flexget
# Place executables in the environment at the front of the path
ENV PATH="/flexget/.venv/bin:$PATH"
VOLUME /config
WORKDIR /config
ENTRYPOINT ["flexget"]