summaryrefslogtreecommitdiffstats
path: root/bundle/docker
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:10:23 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:10:23 +0000
commit96011c9a0b8a4f10e6e06f76acc380d6a802bbee (patch)
tree30ded50e296e5d936800d19ada594982f10111d6 /bundle/docker
parentAdding debian version 2024.04.09-1. (diff)
downloadyt-dlp-96011c9a0b8a4f10e6e06f76acc380d6a802bbee.tar.xz
yt-dlp-96011c9a0b8a4f10e6e06f76acc380d6a802bbee.zip
Merging upstream version 2024.05.26.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'bundle/docker')
-rw-r--r--bundle/docker/compose.yml10
-rw-r--r--bundle/docker/static/Dockerfile21
-rwxr-xr-xbundle/docker/static/entrypoint.sh13
3 files changed, 44 insertions, 0 deletions
diff --git a/bundle/docker/compose.yml b/bundle/docker/compose.yml
new file mode 100644
index 0000000..5f89ca6
--- /dev/null
+++ b/bundle/docker/compose.yml
@@ -0,0 +1,10 @@
+services:
+ static:
+ build: static
+ environment:
+ channel: ${channel}
+ origin: ${origin}
+ version: ${version}
+ volumes:
+ - ~/build:/build
+ - ../..:/yt-dlp
diff --git a/bundle/docker/static/Dockerfile b/bundle/docker/static/Dockerfile
new file mode 100644
index 0000000..dae2dff
--- /dev/null
+++ b/bundle/docker/static/Dockerfile
@@ -0,0 +1,21 @@
+FROM alpine:3.19 as base
+
+RUN apk --update add --no-cache \
+ build-base \
+ python3 \
+ pipx \
+ ;
+
+RUN pipx install pyinstaller
+# Requires above step to prepare the shared venv
+RUN ~/.local/share/pipx/shared/bin/python -m pip install -U wheel
+RUN apk --update add --no-cache \
+ scons \
+ patchelf \
+ binutils \
+ ;
+RUN pipx install staticx
+
+WORKDIR /yt-dlp
+COPY entrypoint.sh /entrypoint.sh
+ENTRYPOINT /entrypoint.sh
diff --git a/bundle/docker/static/entrypoint.sh b/bundle/docker/static/entrypoint.sh
new file mode 100755
index 0000000..93d84fa
--- /dev/null
+++ b/bundle/docker/static/entrypoint.sh
@@ -0,0 +1,13 @@
+#!/bin/ash
+set -e
+
+source ~/.local/share/pipx/venvs/pyinstaller/bin/activate
+python -m devscripts.install_deps --include secretstorage
+python -m devscripts.make_lazy_extractors
+python devscripts/update-version.py -c "${channel}" -r "${origin}" "${version}"
+python -m bundle.pyinstaller
+deactivate
+
+source ~/.local/share/pipx/venvs/staticx/bin/activate
+staticx /yt-dlp/dist/yt-dlp_linux /build/yt-dlp_linux
+deactivate