Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions docker-compose.golang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ services:
context: .
dockerfile: golang/Dockerfile
args:
VERSION: "1.24.9"
VERSION: "1.24.11"
CONTROLLER_GEN_VERSION: "v0.17.3"
# Need to override this because newer versions of gopls don't work with this golang version
GOPLS_VERSION: "v0.20.0"
tags:
- okteto/golang:1
- ghcr.io/okteto/golang:1
Expand All @@ -17,8 +19,10 @@ services:
context: .
dockerfile: golang/Dockerfile
args:
VERSION: "1.24.9"
VERSION: "1.24.11"
CONTROLLER_GEN_VERSION: "v0.17.3"
# Need to override this because newer versions of gopls don't work with this golang version
GOPLS_VERSION: "v0.20.0"
tags:
- okteto/golang:1.24
- ghcr.io/okteto/golang:1.24
Expand All @@ -33,6 +37,8 @@ services:
GOPLS_VERSION: "v0.17.1"
# Need to override this because newer versions of controller-gen don't work with this golang version
CONTROLLER_GEN_VERSION: "v0.16.5"
# Need to override this because newer versions of controller-gen don't work with this golang version
DLV_VERSION: "v1.25.2"
tags:
- okteto/golang:1.23
- ghcr.io/okteto/golang:1.23
9 changes: 6 additions & 3 deletions golang/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@ ARG DEBIAN_VERSION="bookworm"
FROM golang:${VERSION}-${DEBIAN_VERSION} as build

ARG CONTROLLER_GEN_VERSION="v0.17.3"
ARG DLV_VERSION="latest"
ARG DLV_VERSION="v1.26.0"
ARG AIR_VERSION="v1.61.5"
ARG GOPLS_VERSION="latest"
ARG GOPLS_VERSION="v0.21.0"

# buildx provides these automatically for multi-arch
ARG TARGETARCH

RUN go install github.com/codegangsta/gin@latest && \
go install github.com/go-delve/delve/cmd/dlv@${DLV_VERSION} && \
go install golang.org/x/tools/gopls@${GOPLS_VERSION} && \
go install sigs.k8s.io/controller-tools/cmd/controller-gen@${CONTROLLER_GEN_VERSION} && \
curl --retry 5 --retry-all-errors -sSfL https://raw.githubusercontent.com/air-verse/air/master/install.sh | sh -s -- -b /usr/bin -d ${AIR_VERSION}
curl -fsSL "https://github.com/air-verse/air/releases/download/${AIR_VERSION}/air_${AIR_VERSION#v}_linux_${TARGETARCH}.tar.gz" | tar -xz -C /usr/local/bin air

WORKDIR /usr/src/app

Expand Down
Loading