2021-01-08 18:13:57 +00:00
|
|
|
FROM golang:alpine AS build
|
|
|
|
|
|
|
|
WORKDIR /build
|
|
|
|
|
2021-02-01 23:52:33 +00:00
|
|
|
COPY [ "go.mod", "go.sum", "./"]
|
|
|
|
COPY internal ./internal
|
|
|
|
COPY cmd ./cmd
|
2021-01-08 18:13:57 +00:00
|
|
|
|
2021-02-01 23:52:33 +00:00
|
|
|
RUN go build -o cooldns cmd/cooldns.go
|
2021-01-08 18:13:57 +00:00
|
|
|
|
|
|
|
FROM alpine:latest
|
|
|
|
WORKDIR /app
|
|
|
|
|
2021-02-01 23:52:33 +00:00
|
|
|
COPY --from=build /build/cooldns .
|
2021-01-08 18:13:57 +00:00
|
|
|
|
2021-02-01 23:52:33 +00:00
|
|
|
ENTRYPOINT ["/app/cooldns"]
|