Skip to content

Commit 0d95231

Browse files
crazy-maxthaJeztah
authored andcommitted
Dockerfile: use "debian" in stages instead of distro name
Signed-off-by: CrazyMax <[email protected]>
1 parent c5194a9 commit 0d95231

3 files changed

Lines changed: 10 additions & 8 deletions

File tree

.github/workflows/e2e.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- connhelper-ssh
2727
base:
2828
- alpine
29-
- bookworm
29+
- debian
3030
engine-version:
3131
# - 20.10-dind # FIXME: Fails on 20.10
3232
- stable-dind # TODO: Use 20.10-dind, stable-dind is deprecated

Dockerfile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# syntax=docker/dockerfile:1
22

33
ARG BASE_VARIANT=alpine
4-
ARG GO_VERSION=1.21.3
54
ARG ALPINE_VERSION=3.17
5+
ARG BASE_DEBIAN_DISTRO=bookworm
6+
7+
ARG GO_VERSION=1.21.3
68
ARG XX_VERSION=1.2.1
79
ARG GOVERSIONINFO_VERSION=v1.3.0
810
ARG GOTESTSUM_VERSION=v1.10.0
@@ -22,13 +24,13 @@ ARG TARGETPLATFORM
2224
# gcc is installed for libgcc only
2325
RUN xx-apk add --no-cache musl-dev gcc
2426

25-
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-bookworm AS build-base-bookworm
27+
FROM --platform=$BUILDPLATFORM golang:${GO_VERSION}-${BASE_DEBIAN_DISTRO} AS build-base-debian
2628
ENV GOTOOLCHAIN=local
2729
COPY --link --from=xx / /
2830
RUN apt-get update && apt-get install --no-install-recommends -y bash clang lld llvm file
2931
WORKDIR /go/src/github.com/docker/cli
3032

31-
FROM build-base-bookworm AS build-bookworm
33+
FROM build-base-debian AS build-debian
3234
ARG TARGETPLATFORM
3335
RUN xx-apt-get install --no-install-recommends -y libc6-dev libgcc-12-dev pkgconf
3436

@@ -94,7 +96,7 @@ RUN --mount=ro --mount=type=cache,target=/root/.cache \
9496
FROM build-base-alpine AS e2e-base-alpine
9597
RUN apk add --no-cache build-base curl openssl openssh-client
9698

97-
FROM build-base-bookworm AS e2e-base-bookworm
99+
FROM build-base-debian AS e2e-base-debian
98100
RUN apt-get update && apt-get install -y build-essential curl openssl openssh-client
99101

100102
FROM docker/buildx-bin:${BUILDX_VERSION} AS buildx

docker-bake.hcl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ target "binary" {
5252
platforms = ["local"]
5353
output = ["build"]
5454
args = {
55-
BASE_VARIANT = USE_GLIBC == "1" ? "bookworm" : "alpine"
55+
BASE_VARIANT = USE_GLIBC == "1" ? "debian" : "alpine"
5656
VERSION = VERSION
5757
PACKAGER_NAME = PACKAGER_NAME
5858
GO_STRIP = STRIP_TARGET
@@ -72,7 +72,7 @@ target "plugins" {
7272
platforms = ["local"]
7373
output = ["build"]
7474
args = {
75-
BASE_VARIANT = USE_GLIBC == "1" ? "bookworm" : "alpine"
75+
BASE_VARIANT = USE_GLIBC == "1" ? "debian" : "alpine"
7676
VERSION = VERSION
7777
GO_STRIP = STRIP_TARGET
7878
}
@@ -155,7 +155,7 @@ target "e2e-image" {
155155
output = ["type=docker"]
156156
tags = ["${IMAGE_NAME}"]
157157
args = {
158-
BASE_VARIANT = USE_GLIBC == "1" ? "bookworm" : "alpine"
158+
BASE_VARIANT = USE_GLIBC == "1" ? "debian" : "alpine"
159159
VERSION = VERSION
160160
}
161161
}

0 commit comments

Comments
 (0)