mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-25 06:26:37 +00:00
commit
06652b0a06
12
Dockerfile
12
Dockerfile
@ -58,6 +58,8 @@ RUN --mount=type=cache,id=apt-lib-cache-${TARGETARCH},sharing=private,target=/va
|
|||||||
apt-get -y autoclean && \
|
apt-get -y autoclean && \
|
||||||
rm -f /var/cache/debconf/*.dat-old
|
rm -f /var/cache/debconf/*.dat-old
|
||||||
|
|
||||||
|
FROM ghcr.io/astral-sh/uv:latest AS uv-binaries
|
||||||
|
|
||||||
FROM alpine:${ALPINE_VERSION} AS openresty-debian
|
FROM alpine:${ALPINE_VERSION} AS openresty-debian
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
ARG DEBIAN_VERSION
|
ARG DEBIAN_VERSION
|
||||||
@ -279,6 +281,9 @@ RUN set -eu ; \
|
|||||||
FROM scratch AS s6-overlay
|
FROM scratch AS s6-overlay
|
||||||
COPY --from=s6-overlay-extracted /s6-overlay-rootfs /
|
COPY --from=s6-overlay-extracted /s6-overlay-rootfs /
|
||||||
|
|
||||||
|
FROM tubesync-base AS tubesync-uv
|
||||||
|
COPY --from=uv-binaries /uv /uvx /usr/local/bin/
|
||||||
|
|
||||||
FROM tubesync-base AS tubesync-openresty
|
FROM tubesync-base AS tubesync-openresty
|
||||||
|
|
||||||
COPY --from=openresty-debian \
|
COPY --from=openresty-debian \
|
||||||
@ -341,12 +346,10 @@ RUN --mount=type=cache,id=apt-lib-cache-${TARGETARCH},sharing=private,target=/va
|
|||||||
libmariadb3 \
|
libmariadb3 \
|
||||||
libpq5 \
|
libpq5 \
|
||||||
libwebp7 \
|
libwebp7 \
|
||||||
pipenv \
|
|
||||||
pkgconf \
|
pkgconf \
|
||||||
python3 \
|
python3 \
|
||||||
python3-libsass \
|
python3-libsass \
|
||||||
python3-socks \
|
python3-socks \
|
||||||
python3-wheel \
|
|
||||||
curl \
|
curl \
|
||||||
less \
|
less \
|
||||||
&& \
|
&& \
|
||||||
@ -389,9 +392,11 @@ ARG YTDLP_DATE
|
|||||||
|
|
||||||
# Set up the app
|
# Set up the app
|
||||||
RUN --mount=type=tmpfs,target=/cache \
|
RUN --mount=type=tmpfs,target=/cache \
|
||||||
|
--mount=type=cache,id=uv-cache,sharing=locked,target=/cache/uv \
|
||||||
--mount=type=cache,id=pipenv-cache,sharing=locked,target=/cache/pipenv \
|
--mount=type=cache,id=pipenv-cache,sharing=locked,target=/cache/pipenv \
|
||||||
--mount=type=cache,id=apt-lib-cache-${TARGETARCH},sharing=private,target=/var/lib/apt \
|
--mount=type=cache,id=apt-lib-cache-${TARGETARCH},sharing=private,target=/var/lib/apt \
|
||||||
--mount=type=cache,id=apt-cache-cache,sharing=private,target=/var/cache/apt \
|
--mount=type=cache,id=apt-cache-cache,sharing=private,target=/var/cache/apt \
|
||||||
|
--mount=type=bind,source=/uv,target=/usr/local/bin/uv,from=uv-binaries \
|
||||||
--mount=type=bind,source=Pipfile,target=/app/Pipfile \
|
--mount=type=bind,source=Pipfile,target=/app/Pipfile \
|
||||||
set -x && \
|
set -x && \
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
@ -406,7 +411,6 @@ RUN --mount=type=tmpfs,target=/cache \
|
|||||||
make \
|
make \
|
||||||
postgresql-common \
|
postgresql-common \
|
||||||
python3-dev \
|
python3-dev \
|
||||||
python3-pip \
|
|
||||||
zlib1g-dev \
|
zlib1g-dev \
|
||||||
&& \
|
&& \
|
||||||
# Install non-distro packages
|
# Install non-distro packages
|
||||||
@ -415,6 +419,7 @@ RUN --mount=type=tmpfs,target=/cache \
|
|||||||
XDG_CACHE_HOME='/cache' \
|
XDG_CACHE_HOME='/cache' \
|
||||||
PIPENV_VERBOSITY=64 \
|
PIPENV_VERBOSITY=64 \
|
||||||
PYTHONPYCACHEPREFIX=/cache/pycache \
|
PYTHONPYCACHEPREFIX=/cache/pycache \
|
||||||
|
uv tool run --no-config --no-progress --no-managed-python -- \
|
||||||
pipenv install --system --skip-lock && \
|
pipenv install --system --skip-lock && \
|
||||||
# remove the getpot_bgutil_script plugin
|
# remove the getpot_bgutil_script plugin
|
||||||
find /usr/local/lib \
|
find /usr/local/lib \
|
||||||
@ -433,7 +438,6 @@ RUN --mount=type=tmpfs,target=/cache \
|
|||||||
make \
|
make \
|
||||||
postgresql-common \
|
postgresql-common \
|
||||||
python3-dev \
|
python3-dev \
|
||||||
python3-pip \
|
|
||||||
zlib1g-dev \
|
zlib1g-dev \
|
||||||
&& \
|
&& \
|
||||||
apt-get -y autopurge && \
|
apt-get -y autopurge && \
|
||||||
|
Loading…
Reference in New Issue
Block a user