Skip to content

Commit 24f14f8

Browse files
feat: [SVLS-7017] bump go to 1.24.4 (#720)
Fixing DataDog/datadog-agent#37967 . This is actually not necessary. The version of go we actually use to build the script is defined the the `go.work` file in the agent rather than the go version we install in the dockerfiles. So we should be okay (though it's probably good to keep the versions relatively close).
1 parent 56cba7d commit 24f14f8

5 files changed

Lines changed: 37 additions & 7 deletions

File tree

images/Dockerfile.go_agent.alpine.compile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,13 @@ ARG FIPS
88

99
# Install dependencies
1010
RUN apk add --no-cache git make musl-dev gcc
11-
COPY --from=registry.ddbuild.io/images/mirror/golang:1.23.0-alpine /usr/local/go/ /usr/lib/go
11+
12+
# NOTE: the version of go specifed here is used to get the base go tooling for
13+
# our builds. The actual version that we use for building the agent is the one
14+
# listed in the agen't go.work files. The go we install here will download the
15+
# appropriate version specified in the go.work file before running go commands
16+
# for the agent.
17+
COPY --from=registry.ddbuild.io/images/mirror/golang:1.24.4-alpine /usr/local/go/ /usr/lib/go
1218

1319
ENV GOROOT=/usr/lib/go
1420
ENV GOPATH=/go

images/Dockerfile.go_agent.compile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,21 @@ RUN mkdir -p /tmp/dd/datadog-agent
88

99
# Install dependencies
1010
RUN yum install -y wget tar gzip gcc
11+
12+
# NOTE: the version of go specifed here is used to get the base go tooling for
13+
# our builds. The actual version that we use for building the agent is the one
14+
# listed in the agen't go.work files. The go we install here will download the
15+
# appropriate version specified in the go.work file before running go commands
16+
# for the agent.
1117
RUN arch="$(uname -m)"; \
1218
if [ "${arch}" = 'aarch64' ]; then \
1319
arch='arm64'; \
1420
fi; \
1521
if [ "${arch}" = 'x86_64' ]; then \
1622
arch='amd64'; \
1723
fi; \
18-
wget -O go1.23.6.linux-${arch}.tar.gz https://go.dev/dl/go1.23.6.linux-${arch}.tar.gz; \
19-
tar -C /usr/local -xzf go1.23.6.linux-${arch}.tar.gz
24+
wget -O go1.24.4.linux-${arch}.tar.gz https://go.dev/dl/go1.24.4.linux-${arch}.tar.gz; \
25+
tar -C /usr/local -xzf go1.24.4.linux-${arch}.tar.gz
2026

2127
# Copy cached dependencies
2228
COPY ./scripts/.cache/go.mod /tmp/dd/datadog-agent

scripts/Dockerfile.alpine.build

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@ ARG CMD_PATH
77
ARG BUILD_TAGS
88

99
RUN apk add --no-cache git make musl-dev gcc
10-
COPY --from=golang:1.23.8-alpine /usr/local/go/ /usr/lib/go
10+
11+
# NOTE: the version of go specifed here is used to get the base go tooling for
12+
# our builds. The actual version that we use for building the agent is the one
13+
# listed in the agen't go.work files. The go we install here will download the
14+
# appropriate version specified in the go.work file before running go commands
15+
# for the agent.
16+
COPY --from=golang:1.24.4-alpine /usr/local/go/ /usr/lib/go
1117

1218
ENV GOROOT /usr/lib/go
1319
ENV GOPATH /go

scripts/Dockerfile.build

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,21 @@ ARG BUILD_TAGS
88
RUN mkdir -p /tmp/dd/datadog-agent
99

1010
RUN yum install -y wget tar gzip gcc
11+
12+
# NOTE: the version of go specifed here is used to get the base go tooling for
13+
# our builds. The actual version that we use for building the agent is the one
14+
# listed in the agen't go.work files. The go we install here will download the
15+
# appropriate version specified in the go.work file before running go commands
16+
# for the agent.
1117
RUN arch="$(uname -m)"; \
1218
if [ "${arch}" = 'aarch64' ]; then \
1319
arch='arm64'; \
1420
fi; \
1521
if [ "${arch}" = 'x86_64' ]; then \
1622
arch='amd64'; \
1723
fi; \
18-
wget -O go1.23.8.linux-${arch}.tar.gz https://go.dev/dl/go1.23.8.linux-${arch}.tar.gz; \
19-
tar -C /usr/local -xzf go1.23.8.linux-${arch}.tar.gz
24+
wget -O go1.24.4.linux-${arch}.tar.gz https://go.dev/dl/go1.24.4.linux-${arch}.tar.gz; \
25+
tar -C /usr/local -xzf go1.24.4.linux-${arch}.tar.gz
2026

2127
# cache dependencies
2228
COPY ./scripts/.cache/go.mod /tmp/dd/datadog-agent

scripts/Dockerfile.race.build

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# syntax = docker/dockerfile:experimental
22

3-
FROM golang:1.23.8 as builder
3+
# NOTE: the version of go specifed here is used to get the base go tooling for
4+
# our builds. The actual version that we use for building the agent is the one
5+
# listed in the agen't go.work files. The go we install here will download the
6+
# appropriate version specified in the go.work file before running go commands
7+
# for the agent.
8+
FROM golang:1.24.4 as builder
9+
410
ARG EXTENSION_VERSION
511
ARG ENABLE_RACE_DETECTION
612
ARG AGENT_VERSION

0 commit comments

Comments
 (0)