-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(build): Use Debian Bullseye base image for build image (#14368)
This change is necessary to allow the binaries built using the Loki build image to run on operating systems with older libc version. --- Backport of #14368 Signed-off-by: Christian Haudum <[email protected]>
- Loading branch information
Showing
13 changed files
with
88 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,11 @@ | |
# See ../docs/sources/community/maintaining/release-loki-build-image.md for instructions | ||
# on how to publish a new build image. | ||
|
||
ARG GO_VERSION=1.22.5 | ||
ARG GOLANG_BASE_IMAGE=golang:${GO_VERSION}-bullseye | ||
|
||
# Install helm (https://helm.sh/) and helm-docs (https://github.com/norwoodj/helm-docs) for generating Helm Chart reference. | ||
FROM golang:1.22.5-bookworm as helm | ||
FROM ${GOLANG_BASE_IMAGE} AS helm | ||
ARG TARGETARCH | ||
ARG HELM_VER="v3.2.3" | ||
RUN curl -L "https://get.helm.sh/helm-${HELM_VER}-linux-$TARGETARCH.tar.gz" | tar zx && \ | ||
|
@@ -38,7 +41,8 @@ RUN apk add --no-cache curl && \ | |
FROM alpine:3.20.2 as docker | ||
RUN apk add --no-cache docker-cli docker-cli-buildx | ||
|
||
FROM golang:1.22.5-bookworm as drone | ||
|
||
FROM ${GOLANG_BASE_IMAGE} AS drone | ||
ARG TARGETARCH | ||
RUN curl -L "https://github.com/drone/drone-cli/releases/download/v1.7.0/drone_linux_$TARGETARCH".tar.gz | tar zx && \ | ||
install -t /usr/local/bin drone | ||
|
@@ -48,35 +52,35 @@ RUN curl -L "https://github.com/drone/drone-cli/releases/download/v1.7.0/drone_l | |
# Error: | ||
# github.com/fatih/[email protected] requires golang.org/x/[email protected] | ||
# (not golang.org/x/[email protected] from golang.org/x/tools/cmd/goyacc@58d531046acdc757f177387bc1725bfa79895d69) | ||
FROM golang:1.22.5-bookworm as faillint | ||
FROM ${GOLANG_BASE_IMAGE} AS faillint | ||
RUN GO111MODULE=on go install github.com/fatih/[email protected] | ||
RUN GO111MODULE=on go install golang.org/x/tools/cmd/[email protected] | ||
|
||
FROM golang:1.22.5-bookworm as delve | ||
FROM ${GOLANG_BASE_IMAGE} AS delve | ||
RUN GO111MODULE=on go install github.com/go-delve/delve/cmd/dlv@latest | ||
|
||
# Install ghr used to push binaries and template the release | ||
# This collides with the version of go tools used in the base image, thus we install it in its own image and copy it over. | ||
FROM golang:1.22.5-bookworm as ghr | ||
FROM ${GOLANG_BASE_IMAGE} AS ghr | ||
RUN GO111MODULE=on go install github.com/tcnksm/ghr@9349474 | ||
|
||
# Install nfpm (https://nfpm.goreleaser.com) for creating .deb and .rpm packages. | ||
FROM golang:1.22.5-bookworm as nfpm | ||
FROM ${GOLANG_BASE_IMAGE} AS nfpm | ||
RUN GO111MODULE=on go install github.com/goreleaser/nfpm/v2/cmd/[email protected] | ||
|
||
# Install gotestsum | ||
FROM golang:1.22.5-bookworm as gotestsum | ||
FROM ${GOLANG_BASE_IMAGE} AS gotestsum | ||
RUN GO111MODULE=on go install gotest.tools/[email protected] | ||
|
||
# Install tools used to compile jsonnet. | ||
FROM golang:1.22.5-bookworm as jsonnet | ||
FROM ${GOLANG_BASE_IMAGE} AS jsonnet | ||
RUN GO111MODULE=on go install github.com/jsonnet-bundler/jsonnet-bundler/cmd/[email protected] | ||
RUN GO111MODULE=on go install github.com/monitoring-mixins/mixtool/cmd/mixtool@16dc166166d91e93475b86b9355a4faed2400c18 | ||
RUN GO111MODULE=on go install github.com/google/go-jsonnet/cmd/[email protected] | ||
|
||
FROM aquasec/trivy as trivy | ||
|
||
FROM golang:1.22.5-bookworm | ||
FROM ${GOLANG_BASE_IMAGE} | ||
RUN apt-get update && \ | ||
apt-get install -qy \ | ||
musl gnupg ragel \ | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.