github.com/connorvict/air@v0.0.0-20231005162537-279bf07db0d5/Dockerfile (about) 1 FROM golang:1.21 AS builder 2 3 MAINTAINER Rick Yu <cosmtrek@gmail.com> 4 5 ENV GOPATH /go 6 ENV GO111MODULE on 7 8 COPY . /go/src/github.com/cosmtrek/air 9 WORKDIR /go/src/github.com/cosmtrek/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.21 16 17 COPY --from=builder /go/bin/air /go/bin/air 18 19 ENTRYPOINT ["/go/bin/air"]