This commit is contained in:
17
Dockerfile
Normal file
17
Dockerfile
Normal file
@@ -0,0 +1,17 @@
|
||||
# syntax=docker/dockerfile:1
|
||||
|
||||
FROM golang:alpine AS build-stage
|
||||
WORKDIR /app
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
|
||||
COPY *.go ./
|
||||
COPY pkg ./pkg
|
||||
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o /go-persist
|
||||
|
||||
FROM gcr.io/distroless/base-debian11
|
||||
WORKDIR /
|
||||
|
||||
COPY --from=build-stage /go-persist /go-persist
|
||||
ENTRYPOINT ["/go-persist"]
|
||||
Reference in New Issue
Block a user