Files
pointerreplacer/Containerfile
2024-07-28 18:32:58 +02:00

16 lines
323 B
Docker

FROM golang:alpine as builder
ENV CGO_ENABLED 0
RUN go env -w GOCACHE=/go-cache
RUN go env -w GOMODCACHE=/gomod-cache
COPY . /build
WORKDIR /build
RUN --mount=type=cache,target=/gomod-cache --mount=type=cache,target=/go-cache go build -o test ./cmd
FROM scratch
COPY --from=builder /build/test /
ENTRYPOINT ["./test"]