mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-11-28 02:55:30 -05:00
The thumbnails service now always resizes in pure Go. Deployments that want more formats, webp output or an attention crop run a real imagor and point WEBDAV_THUMBNAILS_GENERATOR_URL at it. The built-in service stays as a minimal fallback that keeps working when imagor or libvips have to be taken out, for example during a security issue. Without cgo dependencies the docker images link statically again and no longer need the vips packages. The vips parity run in CI goes away, the regular test run already covers the pure Go build. The preview fixtures of the acceptance tests were rendered by libvips, so they are regenerated with the pure Go build. Text previews now lose their left edge: the 640x480 text canvas is filled into a square box and the pure Go build crops the centre, where libvips' attention crop kept the left side with the text. part of https://github.com/opencloud-eu/opencloud/issues/3912 Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
64 lines
2.2 KiB
Docker
64 lines
2.2 KiB
Docker
FROM quay.io/opencloudeu/golang-ci:1.26 AS build
|
|
ARG TARGETOS
|
|
ARG TARGETARCH
|
|
ARG VERSION
|
|
ARG STRING
|
|
ARG EDITION="dev"
|
|
ARG SRCDIR
|
|
|
|
WORKDIR /build
|
|
RUN --mount=type=bind,target=/build,rw \
|
|
--mount=type=cache,target=/go/pkg/mod \
|
|
--mount=type=cache,target=/root/.cache \
|
|
GOOS="${TARGETOS:-linux}" GOARCH="${TARGETARCH:-amd64}" ; \
|
|
make -C ${SRCDIR:-.}/opencloud release-linux-docker-${TARGETARCH} \
|
|
DIST=/dist \
|
|
VERSION="${VERSION}" EDITION="${EDITION}" \
|
|
${STRING:+STRING="${STRING}"}
|
|
|
|
FROM alpine:3.24
|
|
ARG VERSION
|
|
ARG REVISION
|
|
ARG TARGETOS
|
|
ARG TARGETARCH
|
|
|
|
RUN apk add --no-cache attr bash ca-certificates curl imagemagick \
|
|
inotify-tools libc6-compat mailcap tree patch && \
|
|
echo 'hosts: files dns' >| /etc/nsswitch.conf
|
|
|
|
LABEL maintainer="openCloud GmbH <devops@opencloud.eu>" \
|
|
org.opencontainers.image.title="OpenCloud" \
|
|
org.opencontainers.image.vendor="OpenCloud GmbH" \
|
|
org.opencontainers.image.authors="OpenCloud GmbH" \
|
|
org.opencontainers.image.description="OpenCloud is a modern file-sync and share platform" \
|
|
org.opencontainers.image.licenses="Apache-2.0" \
|
|
org.opencontainers.image.documentation="https://github.com/opencloud-eu/opencloud" \
|
|
org.opencontainers.image.url="https://hub.docker.com/r/opencloud-eu/opencloud" \
|
|
org.opencontainers.image.source="https://github.com/opencloud-eu/opencloud" \
|
|
org.opencontainers.image.version="${VERSION}" \
|
|
org.opencontainers.image.revision="${REVISION}"
|
|
|
|
RUN addgroup -g 1000 -S opencloud-group && \
|
|
adduser -S --ingroup opencloud-group --uid 1000 opencloud-user --home /var/lib/opencloud
|
|
|
|
RUN mkdir -p /var/lib/opencloud && \
|
|
# Pre-create the web directory to avoid permission issues
|
|
mkdir -p /var/lib/opencloud/web/assets/apps && \
|
|
chown -R opencloud-user:opencloud-group /var/lib/opencloud && \
|
|
chmod -R 751 /var/lib/opencloud && \
|
|
mkdir -p /etc/opencloud && \
|
|
chown -R opencloud-user:opencloud-group /etc/opencloud && \
|
|
chmod -R 751 /etc/opencloud
|
|
|
|
VOLUME [ "/var/lib/opencloud", "/etc/opencloud" ]
|
|
WORKDIR /var/lib/opencloud
|
|
|
|
USER 1000
|
|
|
|
EXPOSE 9200/tcp
|
|
|
|
ENTRYPOINT ["/usr/bin/opencloud"]
|
|
CMD ["server"]
|
|
|
|
COPY --from=build /dist/binaries/opencloud-linux-${TARGETARCH} /usr/bin/opencloud
|