Reset project
This commit is contained in:
18
Dockerfile
Normal file
18
Dockerfile
Normal file
@@ -0,0 +1,18 @@
|
||||
FROM golang:1.23 AS builder
|
||||
|
||||
WORKDIR /app
|
||||
COPY go.mod ./
|
||||
|
||||
ENV CGO_ENABLED=0
|
||||
RUN go mod download
|
||||
|
||||
COPY . .
|
||||
RUN go build -o server main.go
|
||||
|
||||
# Copy the server binary into a distroless container
|
||||
FROM gcr.io/distroless/static-debian12:nonroot
|
||||
COPY --from=builder /app/server /
|
||||
|
||||
CMD ["/server"]
|
||||
|
||||
USER nonroot
|
Reference in New Issue
Block a user