wip
This commit is contained in:
24
web.Dockerfile
Normal file
24
web.Dockerfile
Normal 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" ]
|
||||
Reference in New Issue
Block a user