-
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
/
Dockerfile
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:d0199977fdae5d1109a89d0b0014468465e014a9834d0a566ea50871b3255ade 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.7.3@sha256:87a04222b228501907f487b338ca6fc1514a93369bfce6930eb06c8d576e58a4 /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:d0199977fdae5d1109a89d0b0014468465e014a9834d0a566ea50871b3255ade
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"]