Add containers to repo
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
# https://github.com/nextcloud/all-in-one/tree/main/Containers/imaginary
|
||||
FROM golang:1.21.5-alpine3.17@sha256:92cb87af996ec6befc85f0aec27e12ead2fab396695fa8a7abff79e021e58195 as go
|
||||
# hadolint ignore=DL3018
|
||||
RUN set -ex; \
|
||||
apk add --no-cache \
|
||||
vips-jxl \
|
||||
vips-dev \
|
||||
vips-heif \
|
||||
build-base \
|
||||
vips-magick \
|
||||
vips-poppler; \
|
||||
go install github.com/h2non/imaginary@b632dae8cc321452c3f85bcae79c580b1ae1ed84
|
||||
|
||||
FROM alpine:3.20.3@sha256:beefdbd8a1da6d2915566fde36db9db0b524eb737fc57cd1367effd16dc0d06d
|
||||
# hadolint ignore=DL3018
|
||||
RUN set -ex; \
|
||||
apk add --no-cache \
|
||||
vips \
|
||||
curl \
|
||||
tzdata \
|
||||
vips-jxl \
|
||||
vips-heif \
|
||||
vips-magick \
|
||||
vips-poppler \
|
||||
ca-certificates
|
||||
|
||||
COPY --from=go /go/bin/imaginary /usr/local/bin/imaginary
|
||||
|
||||
USER nobody
|
||||
|
||||
# https://github.com/h2non/imaginary#memory-issues
|
||||
ENV MALLOC_ARENA_MAX=2
|
||||
|
||||
ENTRYPOINT ["imaginary", "-p", "${PORT:-9000}"]
|
||||
@@ -0,0 +1 @@
|
||||
20230401
|
||||
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
curr_dir="$1"
|
||||
|
||||
curr_commit="$(cat "$curr_dir/Dockerfile" | grep "go install github.com/h2non/imaginary" | sed -e 's/^[[:space:]]*//' | cut -d ' ' -f3 | cut -d '@' -f2)"
|
||||
imaginary_commit="$(git ls-remote https://github.com/h2non/imaginary.git refs/heads/master | cut -f1)"
|
||||
|
||||
if [ "$imaginary_commit" = "$curr_commit" ]; then
|
||||
echo 'Already up-to-date'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Updating imaginary commit: $imaginary_commit"
|
||||
|
||||
sed -re 's/^(.*)go install github.com\/h2non\/imaginary@.+$/\1go install github.com\/h2non\/imaginary@'"$imaginary_commit"'/;' -i "$curr_dir/Dockerfile"
|
||||
|
||||
echo 'Updated Dockerfile:'
|
||||
echo ''
|
||||
cat "$curr_dir/Dockerfile"
|
||||
Reference in New Issue
Block a user