Files
QSfera/Server/Dockerfile
T
Курнат Андрей e9aa9f8315 Pin Pi server stable image
2026-06-08 20:59:30 +03:00

64 lines
2.1 KiB
Docker

# Please use this Dockerfile only if
# you want to build an image from source without
# pnpm and Go installed on your dev machine.
# You can build КуСфера using this Dockerfile
# by running following command:
# `docker build -t qsfera/qsfera:custom .`
# In most other cases you might want to run the
# following command instead:
# `make -C qsfera dev-docker`
# It will build a `qsfera/qsfera:dev` image for you
# and use your local pnpm and Go caches and therefore
# is a lot faster than the build steps below.
FROM node:24-alpine AS generate
RUN apk add --no-cache bash make git curl tar && \
corepack enable && \
corepack prepare pnpm@9.15.4 --activate
COPY ./ /qsfera/
WORKDIR /qsfera
RUN make node-generate-prod
FROM golang:1.25-alpine AS build
ARG TARGETARCH=arm64
ARG QSFERA_VERSION=7.0.0
ARG QSFERA_EDITION=stable
ARG QSFERA_BUILD_DATE=20260608
RUN apk add bash make git curl gcc musl-dev libc-dev binutils-gold inotify-tools vips-dev
COPY --from=generate /qsfera /qsfera
WORKDIR /qsfera/qsfera
RUN make release-linux-docker-${TARGETARCH} ENABLE_VIPS=true DIST=/dist VERSION="${QSFERA_VERSION}" EDITION="${QSFERA_EDITION}" DATE="${QSFERA_BUILD_DATE}"
FROM alpine:3.23
ARG TARGETARCH=arm64
ARG QSFERA_VERSION=7.0.0
ARG QSFERA_EDITION=stable
ARG QSFERA_BUILD_DATE=20260608
RUN apk add --no-cache attr ca-certificates curl mailcap tree vips && \
echo 'hosts: files dns' >| /etc/nsswitch.conf
LABEL maintainer="QSfera" \
org.opencontainers.image.title="КуСфера" \
org.opencontainers.image.vendor="QSfera" \
org.opencontainers.image.authors="QSfera" \
org.opencontainers.image.description="КуСфера file-sync and share platform" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.documentation="" \
org.opencontainers.image.source="" \
org.opencontainers.image.version="${QSFERA_VERSION}" \
eu.qsfera.image.edition="${QSFERA_EDITION}" \
eu.qsfera.image.build-date="${QSFERA_BUILD_DATE}"
ENTRYPOINT ["/usr/bin/qsfera"]
CMD ["server"]
COPY --from=build /dist/binaries/qsfera-linux-${TARGETARCH} /usr/bin/qsfera