Skip to content

Commit 06652b0

Browse files
authored
Merge pull request #1064 from tcely/patch-15
Install using `uv`
2 parents 8b805ef + b84fbb7 commit 06652b0

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Dockerfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ RUN --mount=type=cache,id=apt-lib-cache-${TARGETARCH},sharing=private,target=/va
5858
apt-get -y autoclean && \
5959
rm -f /var/cache/debconf/*.dat-old
6060

61+
FROM ghcr.io/astral-sh/uv:latest AS uv-binaries
62+
6163
FROM alpine:${ALPINE_VERSION} AS openresty-debian
6264
ARG TARGETARCH
6365
ARG DEBIAN_VERSION
@@ -279,6 +281,9 @@ RUN set -eu ; \
279281
FROM scratch AS s6-overlay
280282
COPY --from=s6-overlay-extracted /s6-overlay-rootfs /
281283

284+
FROM tubesync-base AS tubesync-uv
285+
COPY --from=uv-binaries /uv /uvx /usr/local/bin/
286+
282287
FROM tubesync-base AS tubesync-openresty
283288

284289
COPY --from=openresty-debian \
@@ -341,12 +346,10 @@ RUN --mount=type=cache,id=apt-lib-cache-${TARGETARCH},sharing=private,target=/va
341346
libmariadb3 \
342347
libpq5 \
343348
libwebp7 \
344-
pipenv \
345349
pkgconf \
346350
python3 \
347351
python3-libsass \
348352
python3-socks \
349-
python3-wheel \
350353
curl \
351354
less \
352355
&& \
@@ -389,9 +392,11 @@ ARG YTDLP_DATE
389392

390393
# Set up the app
391394
RUN --mount=type=tmpfs,target=/cache \
395+
--mount=type=cache,id=uv-cache,sharing=locked,target=/cache/uv \
392396
--mount=type=cache,id=pipenv-cache,sharing=locked,target=/cache/pipenv \
393397
--mount=type=cache,id=apt-lib-cache-${TARGETARCH},sharing=private,target=/var/lib/apt \
394398
--mount=type=cache,id=apt-cache-cache,sharing=private,target=/var/cache/apt \
399+
--mount=type=bind,source=/uv,target=/usr/local/bin/uv,from=uv-binaries \
395400
--mount=type=bind,source=Pipfile,target=/app/Pipfile \
396401
set -x && \
397402
apt-get update && \
@@ -406,7 +411,6 @@ RUN --mount=type=tmpfs,target=/cache \
406411
make \
407412
postgresql-common \
408413
python3-dev \
409-
python3-pip \
410414
zlib1g-dev \
411415
&& \
412416
# Install non-distro packages
@@ -415,6 +419,7 @@ RUN --mount=type=tmpfs,target=/cache \
415419
XDG_CACHE_HOME='/cache' \
416420
PIPENV_VERBOSITY=64 \
417421
PYTHONPYCACHEPREFIX=/cache/pycache \
422+
uv tool run --no-config --no-progress --no-managed-python -- \
418423
pipenv install --system --skip-lock && \
419424
# remove the getpot_bgutil_script plugin
420425
find /usr/local/lib \
@@ -433,7 +438,6 @@ RUN --mount=type=tmpfs,target=/cache \
433438
make \
434439
postgresql-common \
435440
python3-dev \
436-
python3-pip \
437441
zlib1g-dev \
438442
&& \
439443
apt-get -y autopurge && \

0 commit comments

Comments
 (0)