This commit is contained in:
2026-05-08 14:06:08 +02:00
parent b314a683c9
commit b4811fba4a
6 changed files with 366 additions and 25 deletions

24
web.Dockerfile Normal file
View File

@@ -0,0 +1,24 @@
FROM golang:1.26.3-trixie AS build
ENV GOOS=linux
ENV CGO_ENABLED=0
ENV GOAMD64=v3
ENV GORISCV64=rva22u64
ENV GOARM64=v8.2
COPY . /src
RUN cd /src \
&& go build -ldflags="-s -w" -o web ./cmd/web \
&& chown 0:0 web \
&& chmod ugo+x web
FROM scratch AS prod
COPY --from=build /etc/passwd /etc/passwd
COPY --from=build /etc/shadow /etc/shadow
COPY --from=build /src/web /web
VOLUME [ "/var/lib/cloudsave" ]
ENTRYPOINT [ "/web" ]