github.com/fairyhunter13/air@v1.40.5/Dockerfile (about)

     1  FROM golang:1.18 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/fairyhunter13/air
     9  WORKDIR /go/src/github.com/fairyhunter13/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.18
    16  
    17  COPY --from=builder /go/bin/air  /go/bin/air
    18  
    19  ENTRYPOINT ["/go/bin/air"]