Publish a slim Docker image without LibreOffice/aria2/media tooling

The full image bundles LibreOffice, CJK fonts, ffmpeg, vips, libraw,
aria2, and supervisord for thumbnail/download features many deployments
never use. Adds Dockerfile.slim shipping just the binary on alpine with
tzdata, and goreleaser entries publishing :slim and :<tag>-slim
manifests alongside the existing images. No supervisor: the container
entrypoint is the cloudreve binary directly.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
pull/3582/head
Tomas Dvorak 2 weeks ago
parent e6793bf6ea
commit 6b05d8d9e5

@ -102,6 +102,25 @@ dockers:
- .build/entrypoint.sh - .build/entrypoint.sh
image_templates: image_templates:
- "ghcr.io/dvorinka/cloudreve:{{ .Tag }}-arm64" - "ghcr.io/dvorinka/cloudreve:{{ .Tag }}-arm64"
- dockerfile: Dockerfile.slim
use: buildx
build_flag_templates:
- "--platform=linux/amd64"
- "--provenance=false"
goos: linux
goarch: amd64
goamd64: v1
image_templates:
- "ghcr.io/dvorinka/cloudreve:{{ .Tag }}-slim-amd64"
- dockerfile: Dockerfile.slim
use: buildx
build_flag_templates:
- "--platform=linux/arm64"
- "--provenance=false"
goos: linux
goarch: arm64
image_templates:
- "ghcr.io/dvorinka/cloudreve:{{ .Tag }}-slim-arm64"
docker_manifests: docker_manifests:
- name_template: "ghcr.io/dvorinka/cloudreve:latest" - name_template: "ghcr.io/dvorinka/cloudreve:latest"
@ -116,3 +135,11 @@ docker_manifests:
image_templates: image_templates:
- "ghcr.io/dvorinka/cloudreve:{{ .Tag }}-amd64" - "ghcr.io/dvorinka/cloudreve:{{ .Tag }}-amd64"
- "ghcr.io/dvorinka/cloudreve:{{ .Tag }}-arm64" - "ghcr.io/dvorinka/cloudreve:{{ .Tag }}-arm64"
- name_template: "ghcr.io/dvorinka/cloudreve:slim"
image_templates:
- "ghcr.io/dvorinka/cloudreve:{{ .Tag }}-slim-amd64"
- "ghcr.io/dvorinka/cloudreve:{{ .Tag }}-slim-arm64"
- name_template: "ghcr.io/dvorinka/cloudreve:{{ .Tag }}-slim"
image_templates:
- "ghcr.io/dvorinka/cloudreve:{{ .Tag }}-slim-amd64"
- "ghcr.io/dvorinka/cloudreve:{{ .Tag }}-slim-arm64"

@ -0,0 +1,35 @@
# Slim variant: no LibreOffice, fonts, aria2, or media/thumbnail tooling.
# Build stage
FROM ghcr.io/goreleaser/goreleaser:v2.10.2 AS builder
WORKDIR /src
# Install goreleaser
RUN apk add --no-cache bash curl git npm nodejs tar zip
RUN npm install -g yarn
# Perform the build
COPY . .
RUN goreleaser build --single-target --snapshot
# Runtime stage
FROM alpine:latest
WORKDIR /cloudreve
RUN apk update \
&& apk add --no-cache tzdata \
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone
COPY --from=builder /src/dist/*/cloudreve ./cloudreve
RUN chmod +x ./cloudreve
EXPOSE 5212
VOLUME ["/cloudreve/data"]
ENTRYPOINT ["./cloudreve"]
Loading…
Cancel
Save