github.com/bilpay-tech/air@v0.0.0-20230514155040-b55f770a4ac6/Dockerfile (about) 1 FROM golang:1.20 AS builder 2 3 MAINTAINER Rick Yu <bilpay-tech@gmail.com> 4 5 ENV GOPATH /go 6 ENV GO111MODULE on 7 8 COPY . /go/src/github.com/bilpay-tech/air 9 WORKDIR /go/src/github.com/bilpay-tech/air 10 11 RUN --mount=type=cache,target=/go/pkg/mod go mod download 12 13 RUN --mount=type=cache,target=/go/pkg/mod --mount=type=cache,target=/root/.cache/go-build make ci && make install 14 15 FROM golang:1.20 16 17 COPY --from=builder /go/bin/air /go/bin/air 18 19 ENTRYPOINT ["/go/bin/air"]