From 617321631ae5f60dc3560b55c3a640d2faefaa11 Mon Sep 17 00:00:00 2001 From: ed Date: Sat, 11 Feb 2023 21:10:28 +0000 Subject: [PATCH] docker: add annotations --- scripts/docker/Dockerfile.ac | 7 +++++++ scripts/docker/Dockerfile.dj | 7 +++++++ scripts/docker/Dockerfile.im | 9 ++++++++- scripts/docker/Dockerfile.iv | 7 +++++++ scripts/docker/Dockerfile.min | 7 +++++++ scripts/docker/Dockerfile.min.pip | 7 +++++++ scripts/docker/Makefile | 2 +- scripts/docker/README.md | 6 +++--- 8 files changed, 47 insertions(+), 5 deletions(-) diff --git a/scripts/docker/Dockerfile.ac b/scripts/docker/Dockerfile.ac index c200cd76..709e486f 100644 --- a/scripts/docker/Dockerfile.ac +++ b/scripts/docker/Dockerfile.ac @@ -11,4 +11,11 @@ RUN apk --no-cache add \ COPY i/dist/copyparty-sfx.py ./ WORKDIR /w +EXPOSE 3923 ENTRYPOINT ["python3", "/z/copyparty-sfx.py", "-c", "/z/initcfg"] + +LABEL org.opencontainers.image.url="https://github.com/9001/copyparty" \ + org.opencontainers.image.source="https://github.com/9001/copyparty/tree/hovudstraum/scripts/docker" \ + org.opencontainers.image.licenses="MIT" \ + org.opencontainers.image.title="copyparty-ac" \ + org.opencontainers.image.description="copyparty with Pillow and FFmpeg (image/audio/video thumbnails, audio transcoding, media tags)" diff --git a/scripts/docker/Dockerfile.dj b/scripts/docker/Dockerfile.dj index 2a0bb998..f10456c8 100644 --- a/scripts/docker/Dockerfile.dj +++ b/scripts/docker/Dockerfile.dj @@ -26,4 +26,11 @@ RUN apk add -U \ COPY i/dist/copyparty-sfx.py ./ WORKDIR /w +EXPOSE 3923 ENTRYPOINT ["python3", "/z/copyparty-sfx.py", "-c", "/z/initcfg"] + +LABEL org.opencontainers.image.url="https://github.com/9001/copyparty" \ + org.opencontainers.image.source="https://github.com/9001/copyparty/tree/hovudstraum/scripts/docker" \ + org.opencontainers.image.licenses="MIT" \ + org.opencontainers.image.title="copyparty-dj" \ + org.opencontainers.image.description="copyparty with all optional dependencies, including musical key / bpm detection" diff --git a/scripts/docker/Dockerfile.im b/scripts/docker/Dockerfile.im index 2cfc393f..e3e63a67 100644 --- a/scripts/docker/Dockerfile.im +++ b/scripts/docker/Dockerfile.im @@ -3,11 +3,18 @@ WORKDIR /z RUN apk --no-cache add \ wget \ - py3-pillow \ + py3-pillow py3-mutagen \ && mkdir /cfg /w \ && chmod 777 /cfg /w \ && echo % /cfg > initcfg COPY i/dist/copyparty-sfx.py ./ WORKDIR /w +EXPOSE 3923 ENTRYPOINT ["python3", "/z/copyparty-sfx.py", "-c", "/z/initcfg"] + +LABEL org.opencontainers.image.url="https://github.com/9001/copyparty" \ + org.opencontainers.image.source="https://github.com/9001/copyparty/tree/hovudstraum/scripts/docker" \ + org.opencontainers.image.licenses="MIT" \ + org.opencontainers.image.title="copyparty-im" \ + org.opencontainers.image.description="copyparty with Pillow and Mutagen (image thumbnails, media tags)" diff --git a/scripts/docker/Dockerfile.iv b/scripts/docker/Dockerfile.iv index e146fbe1..79d477af 100644 --- a/scripts/docker/Dockerfile.iv +++ b/scripts/docker/Dockerfile.iv @@ -14,4 +14,11 @@ RUN apk --no-cache add \ COPY i/dist/copyparty-sfx.py ./ WORKDIR /w +EXPOSE 3923 ENTRYPOINT ["python3", "/z/copyparty-sfx.py", "-c", "/z/initcfg"] + +LABEL org.opencontainers.image.url="https://github.com/9001/copyparty" \ + org.opencontainers.image.source="https://github.com/9001/copyparty/tree/hovudstraum/scripts/docker" \ + org.opencontainers.image.licenses="MIT" \ + org.opencontainers.image.title="copyparty-iv" \ + org.opencontainers.image.description="copyparty with Pillow, FFmpeg, libvips (image/audio/video thumbnails, audio transcoding, media tags)" diff --git a/scripts/docker/Dockerfile.min b/scripts/docker/Dockerfile.min index 81e7d885..aaadf083 100644 --- a/scripts/docker/Dockerfile.min +++ b/scripts/docker/Dockerfile.min @@ -9,4 +9,11 @@ RUN apk --no-cache add \ COPY i/dist/copyparty-sfx.py ./ WORKDIR /w +EXPOSE 3923 ENTRYPOINT ["python3", "/z/copyparty-sfx.py", "-c", "/z/initcfg"] + +LABEL org.opencontainers.image.url="https://github.com/9001/copyparty" \ + org.opencontainers.image.source="https://github.com/9001/copyparty/tree/hovudstraum/scripts/docker" \ + org.opencontainers.image.licenses="MIT" \ + org.opencontainers.image.title="copyparty-min" \ + org.opencontainers.image.description="just copyparty, no thumbnails / media tags / audio transcoding" diff --git a/scripts/docker/Dockerfile.min.pip b/scripts/docker/Dockerfile.min.pip index 48f6e87a..9d01d40c 100644 --- a/scripts/docker/Dockerfile.min.pip +++ b/scripts/docker/Dockerfile.min.pip @@ -9,4 +9,11 @@ RUN apk --no-cache add python3 py3-pip \ && echo % /cfg > initcfg WORKDIR /w +EXPOSE 3923 ENTRYPOINT ["python3", "-m", "copyparty", "-c", "/z/initcfg"] + +LABEL org.opencontainers.image.url="https://github.com/9001/copyparty" \ + org.opencontainers.image.source="https://github.com/9001/copyparty/tree/hovudstraum/scripts/docker" \ + org.opencontainers.image.licenses="MIT" \ + org.opencontainers.image.title="copyparty-min-pip" \ + org.opencontainers.image.description="just copyparty, no thumbnails, no media tags, no audio transcoding" diff --git a/scripts/docker/Makefile b/scripts/docker/Makefile index 2b32d79e..fe5af7d9 100644 --- a/scripts/docker/Makefile +++ b/scripts/docker/Makefile @@ -48,7 +48,7 @@ push: clean: -docker kill `docker ps -q` -docker rm `docker ps -qa` - -docker rmi `docker images -a | awk '/^/{print$$3}'` + -docker rmi -f `docker images -a | awk '//{print$$3}'` hclean: -docker kill `docker ps -q` diff --git a/scripts/docker/README.md b/scripts/docker/README.md index 6839e4e4..8096396e 100644 --- a/scripts/docker/README.md +++ b/scripts/docker/README.md @@ -33,9 +33,9 @@ the recommended way to configure copyparty inside a container is to mount a fold with image size after installation and when gzipped * `min` (57 MiB, 20 gz) is just copyparty itself -* `im` (69 MiB, 24 gz) can create thumbnails using pillow (pics only) -* `ac` (163 MiB, 56 gz) is `im` plus ffmpeg for video/audio thumbnails + audio transcoding -* `iv` (211 MiB, 73 gz) is `ac` plus vips for faster heif / avic / jxl thumbnails +* `im` (70 MiB, 25 gz) can thumbnail images with pillow, parse media files with mutagen +* `ac` (163 MiB, 56 gz) is `im` plus ffmpeg for video/audio thumbs + audio transcoding + better tags +* `iv` (211 MiB, 73 gz) is `ac` plus vips for faster heif / avic / jxl thumbnails * `dj` (309 MiB, 104 gz) is `iv` plus beatroot/keyfinder to detect musical keys and bpm `ac` is recommended since the additional features available in `iv` and `dj` are rarely useful