-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dockerfile: update to debian bookworm #4410
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
# syntax=docker/dockerfile:1 | ||
|
||
ARG BASE_VARIANT=alpine | ||
ARG GO_VERSION=1.21.3 | ||
ARG ALPINE_VERSION=3.17 | ||
ARG BASE_DEBIAN_DISTRO=bookworm | ||
|
||
ARG GO_VERSION=1.21.3 | ||
ARG XX_VERSION=1.2.1 | ||
ARG GOVERSIONINFO_VERSION=v1.3.0 | ||
ARG GOTESTSUM_VERSION=v1.10.0 | ||
|
@@ -22,22 +24,15 @@ ARG TARGETPLATFORM | |
# gcc is installed for libgcc only | ||
RUN xx-apk add --no-cache musl-dev gcc | ||
|
||
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-bullseye AS build-base-bullseye | ||
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-${BASE_DEBIAN_DISTRO} AS build-base-debian | ||
ENV GOTOOLCHAIN=local | ||
COPY --link --from=xx / / | ||
RUN apt-get update && apt-get install --no-install-recommends -y bash clang lld llvm file | ||
WORKDIR /go/src/github.com/docker/cli | ||
|
||
FROM build-base-bullseye AS build-bullseye | ||
FROM build-base-debian AS build-debian | ||
ARG TARGETPLATFORM | ||
RUN xx-apt-get install --no-install-recommends -y libc6-dev libgcc-10-dev | ||
# workaround for issue with llvm 11 for darwin/amd64 platform: | ||
# # github.com/docker/cli/cmd/docker | ||
# /usr/local/go/pkg/tool/linux_amd64/link: /usr/local/go/pkg/tool/linux_amd64/link: running strip failed: exit status 1 | ||
# llvm-strip: error: unsupported load command (cmd=0x5) | ||
# more info: https://github.com/docker/cli/pull/3717 | ||
# FIXME: remove once llvm 12 available on debian | ||
RUN [ "$TARGETPLATFORM" != "darwin/amd64" ] || ln -sfnT /bin/true /usr/bin/llvm-strip | ||
RUN xx-apt-get install --no-install-recommends -y libc6-dev libgcc-12-dev pkgconf | ||
|
||
FROM build-base-${BASE_VARIANT} AS goversioninfo | ||
ARG GOVERSIONINFO_VERSION | ||
|
@@ -66,8 +61,6 @@ ARG VERSION | |
# PACKAGER_NAME sets the company that produced the windows binary | ||
ARG PACKAGER_NAME | ||
COPY --link --from=goversioninfo /out/goversioninfo /usr/bin/goversioninfo | ||
# in bullseye arm64 target does not link with lld so configure it to use ld instead | ||
RUN [ ! -f /etc/alpine-release ] && xx-info is-cross && [ "$(xx-info arch)" = "arm64" ] && XX_CC_PREFER_LINKER=ld xx-clang --setup-target-triple || true | ||
Comment on lines
-69
to
-70
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not required anymore |
||
RUN --mount=type=bind,target=.,ro \ | ||
--mount=type=cache,target=/root/.cache \ | ||
--mount=from=dockercore/golang-cross:xx-sdk-extras,target=/xx-sdk,src=/xx-sdk \ | ||
|
@@ -103,7 +96,7 @@ RUN --mount=ro --mount=type=cache,target=/root/.cache \ | |
FROM build-base-alpine AS e2e-base-alpine | ||
RUN apk add --no-cache build-base curl openssl openssh-client | ||
|
||
FROM build-base-bullseye AS e2e-base-bullseye | ||
FROM build-base-debian AS e2e-base-debian | ||
RUN apt-get update && apt-get install -y build-essential curl openssl openssh-client | ||
|
||
FROM docker/buildx-bin:${BUILDX_VERSION} AS buildx | ||
|
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not required anymore (llvm 14 since bookworm)