mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Dockerfile: disable saving Golang telemetry in dev-container
Disable collecting local telemetry, as collected by Go and Delve; - https://github.com/go-delve/delve/blob/v1.24.1/CHANGELOG.md#1231-2024-09-23 - https://go.dev/doc/telemetry#background Telemetry is only collected, and not sent by default, so let's skip producing it in the first place, as the dev-container is an ephemeral environment, and this telemetry is not used. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -47,6 +47,11 @@ COPY --from=build-dummy /build /build
|
||||
# base
|
||||
FROM --platform=$BUILDPLATFORM ${GOLANG_IMAGE} AS base
|
||||
COPY --from=xx / /
|
||||
# Disable collecting local telemetry, as collected by Go and Delve;
|
||||
#
|
||||
# - https://github.com/go-delve/delve/blob/v1.24.1/CHANGELOG.md#1231-2024-09-23
|
||||
# - https://go.dev/doc/telemetry#background
|
||||
RUN go telemetry off && [ "$(go telemetry)" = "off" ] || { echo "Failed to disable Go telemetry"; exit 1; }
|
||||
RUN echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
|
||||
RUN apt-get update && apt-get install --no-install-recommends -y file
|
||||
ENV GO111MODULE=off
|
||||
|
||||
Reference in New Issue
Block a user