Files
Курнат Андрей 7135199f23
Server / deployment-config (push) Successful in 59s
Android / test-and-build (push) Failing after 1m14s
Server / vulnerability-scan (push) Failing after 8m54s
Make photo library offline-first and fix video thumbnails
2026-07-19 21:01:35 +03:00

68 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
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
FROM alpine:3.23
ARG TARGETARCH=arm64
RUN apk add --no-cache attr ca-certificates curl ffmpeg 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=""
RUN addgroup -g 1000 -S qsfera-group && \
adduser -S --ingroup qsfera-group --uid 1000 qsfera-user --home /var/lib/qsfera && \
mkdir -p /var/lib/qsfera/web/assets/apps /etc/qsfera && \
chown -R qsfera-user:qsfera-group /var/lib/qsfera /etc/qsfera && \
chmod -R 751 /var/lib/qsfera /etc/qsfera
VOLUME ["/var/lib/qsfera", "/etc/qsfera"]
WORKDIR /var/lib/qsfera
USER 1000
EXPOSE 9200/tcp
ENTRYPOINT ["/usr/bin/qsfera"]
CMD ["server"]
COPY --from=build /dist/binaries/qsfera-linux-${TARGETARCH} /usr/bin/qsfera