Create build folder

This commit is contained in:
2026-01-03 18:53:20 +05:30
parent 7c615babc2
commit fba5162b6d
5 changed files with 0 additions and 0 deletions

21
build/Dockerfile Normal file
View File

@@ -0,0 +1,21 @@
FROM golang:1.21-alpine AS builder
WORKDIR /app
COPY go.mod main.go ./
RUN go mod tidy && \
go mod download && \
CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o server .
FROM scratch
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /app/server /server
USER 65534:65534
EXPOSE 4050
ENTRYPOINT ["/server"]