From 6fe6d7e0b4da44a57b1f1c1226b40fb712b50a22 Mon Sep 17 00:00:00 2001 From: Zoey Date: Thu, 6 Apr 2023 15:05:59 +0200 Subject: [PATCH 1/7] migrate imaginary container to alpine I think this is much better, then the old workflow (https://github.com/nextcloud-releases/all-in-one/blob/main/.github/workflows/imaginary.yml) Signed-off-by: Zoey --- Containers/imaginary/Dockerfile | 40 +++++++++++++-------------------- 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/Containers/imaginary/Dockerfile b/Containers/imaginary/Dockerfile index 82ca2dc1..9a1315e6 100644 --- a/Containers/imaginary/Dockerfile +++ b/Containers/imaginary/Dockerfile @@ -1,29 +1,21 @@ -# From https://github.com/h2non/imaginary/blob/master/Dockerfile -FROM nextcloud/imaginary:20230301 +FROM golang:1.20.3-alpine3.17 as go +RUN apk add --no-cache \ + vips-dev \ + build-base; \ + go install github.com/h2non/imaginary@master # use master branch as base -USER root -RUN set -ex; \ - \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - netcat \ - ; \ - echo "deb http://deb.debian.org/debian bookworm main" > /etc/apt/sources.list.d/bookworm.list; \ - apt-get update; \ - apt-get install -t bookworm -y --no-install-recommends \ - libheif1 \ - libde265-0 \ - libx265-199 \ - libvips \ - ; \ - rm /etc/apt/sources.list.d/bookworm.list; \ - rm -rf /var/lib/apt/lists/* -USER nobody +FROM alpine:3.17.3 +RUN apk add --no-cache \ + tzdata \ + ca-certificates \ + netcat-openbsd \ + vips-dev -ENTRYPOINT ["/usr/local/bin/imaginary", "-return-size", "-max-allowed-resolution", "222.2"] - -HEALTHCHECK CMD nc -z localhost 9000 || exit 1 -LABEL com.centurylinklabs.watchtower.monitor-only="true" +COPY --from=go /go/bin/imaginary /usr/local/bin/imaginary # https://github.com/h2non/imaginary#memory-issues ENV MALLOC_ARENA_MAX=2 +ENTRYPOINT ["imaginary", "-return-size", "-max-allowed-resolution", "222.2"] + +HEALTHCHECK CMD nc -z localhost 9000 || exit 1 +LABEL com.centurylinklabs.watchtower.monitor-only="true" From 8cabad38a659526c113f0c12a9c6b6310cd5548b Mon Sep 17 00:00:00 2001 From: Zoey Date: Mon, 10 Apr 2023 17:20:04 +0200 Subject: [PATCH 2/7] use commit sha and port 9000 Signed-off-by: Zoey --- Containers/imaginary/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Containers/imaginary/Dockerfile b/Containers/imaginary/Dockerfile index 9a1315e6..4d9558d4 100644 --- a/Containers/imaginary/Dockerfile +++ b/Containers/imaginary/Dockerfile @@ -2,7 +2,7 @@ FROM golang:1.20.3-alpine3.17 as go RUN apk add --no-cache \ vips-dev \ build-base; \ - go install github.com/h2non/imaginary@master # use master branch as base + go install github.com/h2non/imaginary@b632dae FROM alpine:3.17.3 RUN apk add --no-cache \ @@ -15,7 +15,7 @@ COPY --from=go /go/bin/imaginary /usr/local/bin/imaginary # https://github.com/h2non/imaginary#memory-issues ENV MALLOC_ARENA_MAX=2 -ENTRYPOINT ["imaginary", "-return-size", "-max-allowed-resolution", "222.2"] +ENTRYPOINT ["imaginary", "-p", "9000", "-return-size", "-max-allowed-resolution", "222.2"] HEALTHCHECK CMD nc -z localhost 9000 || exit 1 LABEL com.centurylinklabs.watchtower.monitor-only="true" From 401150d427108a67f77a6c7017a5ca2256867c6c Mon Sep 17 00:00:00 2001 From: Zoey Date: Thu, 13 Apr 2023 21:51:51 +0200 Subject: [PATCH 3/7] add workflow Signed-off-by: Zoey --- .github/workflows/imaginary-update.yml | 36 ++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/imaginary-update.yml diff --git a/.github/workflows/imaginary-update.yml b/.github/workflows/imaginary-update.yml new file mode 100644 index 00000000..2a3db590 --- /dev/null +++ b/.github/workflows/imaginary-update.yml @@ -0,0 +1,36 @@ +# Inspired by https://github.com/nextcloud/docker/blob/master/.github/workflows/update-sh.yml +name: imaginary-update + +on: + workflow_dispatch: + schedule: + - cron: '00 12 * * *' + +jobs: + run_update: + name: update to latest imaginary commit on master branch + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Run imaginary-update + run: | + # Inspired by https://github.com/nextcloud/docker/blob/master/update.sh + + # Imaginary + imaginary_version="$( + git ls-remote https://github.com/h2non/imaginary master \ + | cut -f1 \ + | tail -1 + )" + sed -i "s|go install github.com/h2non/imaginaryq.*;|go install github.com/h2non/imaginary@$imaginary_version|" ./Containers/imaginary/Dockerfile + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v5 + with: + commit-message: imaginary-update automated change + signoff: true + title: Imaginary update + body: Automated Imaginary container update + labels: dependencies, enhancement + milestone: next + branch: imaginary-container-update From 1818eb10c325b5fd1cd9854a8e070f90a80d27d6 Mon Sep 17 00:00:00 2001 From: Zoey Date: Fri, 14 Apr 2023 15:54:57 +0200 Subject: [PATCH 4/7] Update .github/workflows/imaginary-update.yml Co-authored-by: Simon L. Signed-off-by: Zoey --- .github/workflows/imaginary-update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/imaginary-update.yml b/.github/workflows/imaginary-update.yml index 2a3db590..bd626554 100644 --- a/.github/workflows/imaginary-update.yml +++ b/.github/workflows/imaginary-update.yml @@ -22,7 +22,7 @@ jobs: | cut -f1 \ | tail -1 )" - sed -i "s|go install github.com/h2non/imaginaryq.*;|go install github.com/h2non/imaginary@$imaginary_version|" ./Containers/imaginary/Dockerfile + sed -i "s|go install github.com/h2non/imaginaryq.*|go install github.com/h2non/imaginary@$imaginary_version|" ./Containers/imaginary/Dockerfile - name: Create Pull Request uses: peter-evans/create-pull-request@v5 From f122ee5a076e02a976ea90c64a37f076ef0b05bf Mon Sep 17 00:00:00 2001 From: Zoey Date: Fri, 14 Apr 2023 15:55:12 +0200 Subject: [PATCH 5/7] Update .github/workflows/imaginary-update.yml Co-authored-by: Simon L. Signed-off-by: Zoey --- .github/workflows/imaginary-update.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/imaginary-update.yml b/.github/workflows/imaginary-update.yml index bd626554..819bc13b 100644 --- a/.github/workflows/imaginary-update.yml +++ b/.github/workflows/imaginary-update.yml @@ -14,8 +14,6 @@ jobs: - uses: actions/checkout@v3 - name: Run imaginary-update run: | - # Inspired by https://github.com/nextcloud/docker/blob/master/update.sh - # Imaginary imaginary_version="$( git ls-remote https://github.com/h2non/imaginary master \ From ead696b6830cec7a0eed98f9e1f044755f762f34 Mon Sep 17 00:00:00 2001 From: Zoey Date: Fri, 14 Apr 2023 15:55:32 +0200 Subject: [PATCH 6/7] Update .github/workflows/imaginary-update.yml Co-authored-by: Simon L. Signed-off-by: Zoey --- .github/workflows/imaginary-update.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/imaginary-update.yml b/.github/workflows/imaginary-update.yml index 819bc13b..8860e34c 100644 --- a/.github/workflows/imaginary-update.yml +++ b/.github/workflows/imaginary-update.yml @@ -1,4 +1,3 @@ -# Inspired by https://github.com/nextcloud/docker/blob/master/.github/workflows/update-sh.yml name: imaginary-update on: From 7f918c37fc2099ece588feb78b48df5bd69ffe0e Mon Sep 17 00:00:00 2001 From: Zoey Date: Fri, 14 Apr 2023 16:06:37 +0200 Subject: [PATCH 7/7] fix typo Signed-off-by: Zoey --- .github/workflows/imaginary-update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/imaginary-update.yml b/.github/workflows/imaginary-update.yml index 8860e34c..12bd9e86 100644 --- a/.github/workflows/imaginary-update.yml +++ b/.github/workflows/imaginary-update.yml @@ -19,7 +19,7 @@ jobs: | cut -f1 \ | tail -1 )" - sed -i "s|go install github.com/h2non/imaginaryq.*|go install github.com/h2non/imaginary@$imaginary_version|" ./Containers/imaginary/Dockerfile + sed -i "s|go install github.com/h2non/imaginary.*|go install github.com/h2non/imaginary@$imaginary_version|" ./Containers/imaginary/Dockerfile - name: Create Pull Request uses: peter-evans/create-pull-request@v5