Files
air/Dockerfile
Goutham Veeramachaneni f57c2f91eb Update dockerfile to golang 1.26 (#883)
* Update dockerfile to golang 1.26

fixes https://github.com/air-verse/air/issues/882

Signed-off-by: Goutham Veeramachaneni <goutham@grafana.com>

* Scope PR to Dockerfile-only: keep go.mod at 1.25 for compatibility

Revert go.mod, CI workflows, READMEs, and AGENTS.md changes per
reviewer feedback — only update the Docker base image to Go 1.26.
This preserves broad `go install` compatibility for users on older
Go versions.

Signed-off-by: Goutham Veeramachaneni <goutham@grafana.com>

---------

Signed-off-by: Goutham Veeramachaneni <goutham@grafana.com>
2026-03-03 09:39:39 +08:00

20 lines
479 B
Docker

FROM golang:1.26 AS builder
LABEL maintainer="Rick Yu <cosmtrek@gmail.com>"
ENV GOPATH /go
ENV GO111MODULE on
COPY . /go/src/github.com/air-verse/air
WORKDIR /go/src/github.com/air-verse/air
RUN --mount=type=cache,target=/go/pkg/mod go mod download
RUN --mount=type=cache,target=/go/pkg/mod --mount=type=cache,target=/root/.cache/go-build make ci && make install
FROM golang:1.26
COPY --from=builder /go/bin/air /go/bin/air
ENTRYPOINT ["/go/bin/air"]