You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cloudreve/Dockerfile

46 lines
1.1 KiB

# 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 vips-tools ffmpeg libreoffice aria2 supervisor font-noto font-noto-cjk libheif\
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& mkdir -p ./data/temp/aria2 \
&& chmod -R 766 ./data/temp/aria2
ENV CR_ENABLE_ARIA2=1 \
CR_SETTING_DEFAULT_thumb_ffmpeg_enabled=1 \
CR_SETTING_DEFAULT_thumb_vips_enabled=1 \
CR_SETTING_DEFAULT_thumb_libreoffice_enabled=1 \
CR_SETTING_DEFAULT_media_meta_ffprobe=1
COPY .build/aria2.supervisor.conf .build/entrypoint.sh ./
COPY --from=builder /src/dist/*/cloudreve ./cloudreve
RUN chmod +x ./cloudreve \
&& chmod +x ./entrypoint.sh
EXPOSE 5212 443
VOLUME ["/cloudreve/data"]
ENTRYPOINT ["sh", "./entrypoint.sh"]