Skip to content
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

chore: integrate binary build in windows dockerfile #7836

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mainred
Copy link
Contributor

@mainred mainred commented Dec 13, 2024

What type of PR is this?

What this PR does / why we need it:

This change is originated from the image build failure, which fails to recognize the godebug directive in go.mod because the lower version of local golang version. While linux docker images are built successfully because we build the binary the in linux dockerfile, the build environment is the same one defined in go.mod. We want to apply the method in windows docker image build as well. Since windows binary can be treated differently for security reason, we support building windows binary locally optionally, and by default, we use non-local windows binary by building the binary in a build stage in the dockerfile.

  • test build windows amd64 image with local build
LOCAL_WINDOWS_BUILD=true make build-node-image-windows
docker buildx inspect img-builder > /dev/null 2>&1 || docker buildx create --name img-builder --use
# enable qemu for arm64 build
# https://github.com/docker/buildx/issues/464#issuecomment-741507760
docker run --privileged --rm tonistiigi/binfmt --uninstall qemu-aarch64
uninstalling: qemu-aarch64 OK
{
  "supported": [
    "linux/amd64",
    "linux/riscv64",
    "linux/ppc64le",
    "linux/s390x",
    "linux/386",
    "linux/mips64le",
    "linux/mips64",
    "linux/arm/v7",
    "linux/arm/v6"
  ],
  "emulators": [
    "llvm-14-runtime.binfmt",
    "llvm-17-runtime.binfmt",
    "qemu-arm",
    "qemu-mips64",
    "qemu-mips64el",
    "qemu-ppc64le",
    "qemu-riscv64",
    "qemu-s390x"
  ]
}
docker run --rm --privileged tonistiigi/binfmt --install all
installing: arm64 OK
{
  "supported": [
    "linux/amd64",
    "linux/arm64",
    "linux/riscv64",
    "linux/ppc64le",
    "linux/s390x",
    "linux/386",
    "linux/mips64le",
    "linux/mips64",
    "linux/arm/v7",
    "linux/arm/v6"
  ],
  "emulators": [
    "llvm-14-runtime.binfmt",
    "llvm-17-runtime.binfmt",
    "qemu-aarch64",
    "qemu-arm",
    "qemu-mips64",
    "qemu-mips64el",
    "qemu-ppc64le",
    "qemu-riscv64",
    "qemu-s390x"
  ]
}
docker buildx build --pull \
        --output=type=docker \
        --platform windows/amd64 \
        -t local/azure-cloud-node-manager:fda2cd4-windows-1809-amd64 \
        --build-arg OSVERSION=1809 \
        --build-arg ARCH=amd64 \
        --build-arg LOCAL_BUILD=true \
        -f cloud-node-manager-windows.Dockerfile . \
        --provenance=false \
        --sbom=false
[+] Building 21.6s (20/20) FINISHED                                                                                                      docker-container:img-builder
 => [internal] load build definition from cloud-node-manager-windows.Dockerfile                                                                                  0.1s
 => => transferring dockerfile: 2.85kB                                                                                                                           0.0s
 => resolve image config for docker-image://docker.io/docker/dockerfile:1                                                                                        0.3s
 => CACHED docker-image://docker.io/docker/dockerfile:1@sha256:db1ff77fb637a5955317c7a3a62540196396d565f3dd5742e76dddbb6d75c4c5                                  0.0s
 => => resolve docker.io/docker/dockerfile:1@sha256:db1ff77fb637a5955317c7a3a62540196396d565f3dd5742e76dddbb6d75c4c5                                             0.0s
 => [internal] load build definition from cloud-node-manager-windows.Dockerfile                                                                                  0.0s
 => WARN: FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 23)                                            0.0s
 => WARN: FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 32)                                            0.0s
 => WARN: FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 48)                                            0.0s
 => [internal] load metadata for mcr.microsoft.com/windows/nanoserver:1809                                                                                       0.1s
 => [internal] load metadata for mcr.microsoft.com/oss/go/microsoft/golang:1.23@sha256:f4fc81062796c14e704559cad3748c5db70bf961ef24d5fac798afa18dff300e          0.1s
 => [internal] load metadata for gcr.io/k8s-staging-e2e-test-images/windows-servercore-cache:1.0-linux-amd64-1809                                                0.5s
 => [internal] load .dockerignore                                                                                                                                0.1s
 => => transferring context: 150B                                                                                                                                0.0s
 => [local-build-false 1/4] FROM mcr.microsoft.com/oss/go/microsoft/golang:1.23@sha256:f4fc81062796c14e704559cad3748c5db70bf961ef24d5fac798afa18dff300e          0.1s
 => => resolve mcr.microsoft.com/oss/go/microsoft/golang:1.23@sha256:f4fc81062796c14e704559cad3748c5db70bf961ef24d5fac798afa18dff300e                            0.1s
 => [internal] load build context                                                                                                                               15.5s
 => => transferring context: 400.45MB                                                                                                                           15.3s
 => [stage-4 1/3] FROM mcr.microsoft.com/windows/nanoserver:1809@sha256:579994616649b876dd2e4009dae4af92f6e53561045230b8cdd53b3baf2f99d0                         0.1s
 => => resolve mcr.microsoft.com/windows/nanoserver:1809@sha256:579994616649b876dd2e4009dae4af92f6e53561045230b8cdd53b3baf2f99d0                                 0.1s
 => [servercore-helper 1/1] FROM gcr.io/k8s-staging-e2e-test-images/windows-servercore-cache:1.0-linux-amd64-1809@sha256:8630b0020e3c6b57879818b8cccf3e47e66f3c  0.1s
 => => resolve gcr.io/k8s-staging-e2e-test-images/windows-servercore-cache:1.0-linux-amd64-1809@sha256:8630b0020e3c6b57879818b8cccf3e47e66f3c4feac0a7a73469c9ba  0.1s
 => CACHED [local-build-false 2/4] WORKDIR /go/src/sigs.k8s.io/cloud-provider-azure                                                                              0.0s
 => CACHED [local-build-false 3/4] COPY . .                                                                                                                      0.0s
 => CACHED [stage-4 2/3] COPY --from=servercore-helper /Windows/System32/netapi32.dll /Windows/System32/netapi32.dll                                             0.0s
 => CACHED [local-build-true 3/4] COPY . .                                                                                                                       0.0s
 => CACHED [local-build-true 4/4] COPY bin/azure-cloud-node-manager-*.exe bin/                                                                                   0.0s
 => CACHED [stage-4 3/3] COPY --from=builder /go/src/sigs.k8s.io/cloud-provider-azure/bin/azure-cloud-node-manager-amd64.exe /cloud-node-manager.exe             0.0s
 => exporting to docker image format                                                                                                                             4.1s
 => => exporting layers                                                                                                                                          0.0s
 => => exporting manifest sha256:47ef884e3a35e6d3270d361c73ab6e7b33e78cbd2a066bdad493590035ea53c9                                                                0.1s
 => => exporting config sha256:47e5fe3b214b379eb2c04b208e6c8b6c6828d940f7d801fa7a19d22cc2df18ed                                                                  0.0s
 => => sending tarball                                                                                                                                           4.0s
 => importing to docker                                                                                                                                          0.0s

 3 warnings found (use --debug to expand):
 - FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 23)
 - FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 32)
 - FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 48)
  • test build windows amd64 image without local build
make build-node-image-windows
docker buildx inspect img-builder > /dev/null 2>&1 || docker buildx create --name img-builder --use
# enable qemu for arm64 build
# https://github.com/docker/buildx/issues/464#issuecomment-741507760
docker run --privileged --rm tonistiigi/binfmt --uninstall qemu-aarch64
uninstalling: qemu-aarch64 OK
{
  "supported": [
    "linux/amd64",
    "linux/riscv64",
    "linux/ppc64le",
    "linux/s390x",
    "linux/386",
    "linux/mips64le",
    "linux/mips64",
    "linux/arm/v7",
    "linux/arm/v6"
  ],
  "emulators": [
    "llvm-14-runtime.binfmt",
    "llvm-17-runtime.binfmt",
    "qemu-arm",
    "qemu-mips64",
    "qemu-mips64el",
    "qemu-ppc64le",
    "qemu-riscv64",
    "qemu-s390x"
  ]
}
docker run --rm --privileged tonistiigi/binfmt --install all
installing: arm64 OK
{
  "supported": [
    "linux/amd64",
    "linux/arm64",
    "linux/riscv64",
    "linux/ppc64le",
    "linux/s390x",
    "linux/386",
    "linux/mips64le",
    "linux/mips64",
    "linux/arm/v7",
    "linux/arm/v6"
  ],
  "emulators": [
    "llvm-14-runtime.binfmt",
    "llvm-17-runtime.binfmt",
    "qemu-aarch64",
    "qemu-arm",
    "qemu-mips64",
    "qemu-mips64el",
    "qemu-ppc64le",
    "qemu-riscv64",
    "qemu-s390x"
  ]
}
docker buildx build --pull \
        --output=type=docker \
        --platform windows/amd64 \
        -t local/azure-cloud-node-manager:fda2cd4-windows-1809-amd64 \
        --build-arg OSVERSION=1809 \
        --build-arg ARCH=amd64 \
        --build-arg LOCAL_BUILD=false \
        -f cloud-node-manager-windows.Dockerfile . \
        --provenance=false \
        --sbom=false
[+] Building 60.1s (22/22) FINISHED                                                                                                              docker-container:img-builder
 => [internal] load build definition from cloud-node-manager-windows.Dockerfile                                                                                          0.1s
 => => transferring dockerfile: 2.85kB                                                                                                                                   0.0s
 => resolve image config for docker-image://docker.io/docker/dockerfile:1                                                                                                0.7s
 => [auth] docker/dockerfile:pull token for registry-1.docker.io                                                                                                         0.0s
 => CACHED docker-image://docker.io/docker/dockerfile:1@sha256:db1ff77fb637a5955317c7a3a62540196396d565f3dd5742e76dddbb6d75c4c5                                          0.0s
 => => resolve docker.io/docker/dockerfile:1@sha256:db1ff77fb637a5955317c7a3a62540196396d565f3dd5742e76dddbb6d75c4c5                                                     0.0s
 => [internal] load build definition from cloud-node-manager-windows.Dockerfile                                                                                          0.0s
 => WARN: FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 23)                                                    0.0s
 => WARN: FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 32)                                                    0.0s
 => WARN: FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 48)                                                    0.0s
 => [internal] load metadata for mcr.microsoft.com/windows/nanoserver:1809                                                                                               0.2s
 => [internal] load metadata for mcr.microsoft.com/oss/go/microsoft/golang:1.23@sha256:f4fc81062796c14e704559cad3748c5db70bf961ef24d5fac798afa18dff300e                  0.2s
 => [internal] load metadata for gcr.io/k8s-staging-e2e-test-images/windows-servercore-cache:1.0-linux-amd64-1809                                                        0.6s
 => [internal] load .dockerignore                                                                                                                                        0.2s
 => => transferring context: 150B                                                                                                                                        0.0s
 => [local-build-false 1/4] FROM mcr.microsoft.com/oss/go/microsoft/golang:1.23@sha256:f4fc81062796c14e704559cad3748c5db70bf961ef24d5fac798afa18dff300e                  0.1s
 => => resolve mcr.microsoft.com/oss/go/microsoft/golang:1.23@sha256:f4fc81062796c14e704559cad3748c5db70bf961ef24d5fac798afa18dff300e                                    0.1s
 => [stage-4 1/3] FROM mcr.microsoft.com/windows/nanoserver:1809@sha256:579994616649b876dd2e4009dae4af92f6e53561045230b8cdd53b3baf2f99d0                                 0.1s
 => => resolve mcr.microsoft.com/windows/nanoserver:1809@sha256:579994616649b876dd2e4009dae4af92f6e53561045230b8cdd53b3baf2f99d0                                         0.1s
 => [servercore-helper 1/1] FROM gcr.io/k8s-staging-e2e-test-images/windows-servercore-cache:1.0-linux-amd64-1809@sha256:8630b0020e3c6b57879818b8cccf3e47e66f3c4feac0a7  0.1s
 => => resolve gcr.io/k8s-staging-e2e-test-images/windows-servercore-cache:1.0-linux-amd64-1809@sha256:8630b0020e3c6b57879818b8cccf3e47e66f3c4feac0a7a73469c9baf6b2f73a  0.1s
 => [internal] load build context                                                                                                                                       11.0s
 => => transferring context: 400.45MB                                                                                                                                   10.8s
 => CACHED [local-build-false 2/4] WORKDIR /go/src/sigs.k8s.io/cloud-provider-azure                                                                                      0.0s
 => CACHED [local-build-false 3/4] COPY . .                                                                                                                              0.0s
 => [local-build-false 4/4] RUN make bin/azure-cloud-node-manager.exe ENABLE_GIT_COMMAND=true ARCH=amd64                                                               135.7s
 => CACHED [stage-4 2/3] COPY --from=servercore-helper /Windows/System32/netapi32.dll /Windows/System32/netapi32.dll                                                     0.0s
 => CACHED [local-build-false 3/4] COPY . .                                                                                                                              0.0s
 => CACHED [local-build-false 4/4] RUN make bin/azure-cloud-node-manager.exe ENABLE_GIT_COMMAND=true ARCH=amd64                                                          0.0s
 => [stage-4 3/3] COPY --from=builder /go/src/sigs.k8s.io/cloud-provider-azure/bin/azure-cloud-node-manager-amd64.exe /cloud-node-manager.exe                            1.4s
 => exporting to docker image format                                                                                                                                     6.3s
 => => exporting layers                                                                                                                                                  4.6s
 => => exporting manifest sha256:174c8642f20cef3052c8d272b6cccef39dfcfa39e707197da99b80ac55a7e931                                                                        0.0s
 => => exporting config sha256:44e6d6eee16883fb0ba08557197c81cee104ecac7f119f13bc3405ea5a3bbbdb                                                                          0.0s
 => => sending tarball                                                                                                                                                   1.7s
 => importing to docker                                                                                                                                                  0.0s

 3 warnings found (use --debug to expand):
 - FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 23)
 - FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 32)
 - FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 48)
  • test build windows hostprocess image with local build
LOCAL_WINDOWS_BUILD=true make build-node-image-windows-hpc
docker buildx inspect img-builder > /dev/null 2>&1 || docker buildx create --name img-builder --use
# enable qemu for arm64 build
# https://github.com/docker/buildx/issues/464#issuecomment-741507760
docker run --privileged --rm tonistiigi/binfmt --uninstall qemu-aarch64
uninstalling: qemu-aarch64 OK
{
  "supported": [
    "linux/amd64",
    "linux/riscv64",
    "linux/ppc64le",
    "linux/s390x",
    "linux/386",
    "linux/mips64le",
    "linux/mips64",
    "linux/arm/v7",
    "linux/arm/v6"
  ],
  "emulators": [
    "llvm-14-runtime.binfmt",
    "llvm-17-runtime.binfmt",
    "qemu-arm",
    "qemu-mips64",
    "qemu-mips64el",
    "qemu-ppc64le",
    "qemu-riscv64",
    "qemu-s390x"
  ]
}
docker run --rm --privileged tonistiigi/binfmt --install all
installing: arm64 OK
{
  "supported": [
    "linux/amd64",
    "linux/arm64",
    "linux/riscv64",
    "linux/ppc64le",
    "linux/s390x",
    "linux/386",
    "linux/mips64le",
    "linux/mips64",
    "linux/arm/v7",
    "linux/arm/v6"
  ],
  "emulators": [
    "llvm-14-runtime.binfmt",
    "llvm-17-runtime.binfmt",
    "qemu-aarch64",
    "qemu-arm",
    "qemu-mips64",
    "qemu-mips64el",
    "qemu-ppc64le",
    "qemu-riscv64",
    "qemu-s390x"
  ]
}
docker buildx build --pull \
        --output=type=docker \
        --platform windows/amd64 \
        -t local/azure-cloud-node-manager:fda2cd4-windows-hpc-amd64 \
        --build-arg ARCH=amd64 \
        --build-arg LOCAL_BUILD=true \
        -f cloud-node-manager-windows-hpc.Dockerfile . \
        --provenance=false \
        --sbom=false
[+] Building 7.8s (16/16) FINISHED                                                                                                               docker-container:img-builder
 => [internal] load build definition from cloud-node-manager-windows-hpc.Dockerfile                                                                                      0.0s
 => => transferring dockerfile: 1.81kB                                                                                                                                   0.0s
 => resolve image config for docker-image://docker.io/docker/dockerfile:1                                                                                                0.3s
 => CACHED docker-image://docker.io/docker/dockerfile:1@sha256:db1ff77fb637a5955317c7a3a62540196396d565f3dd5742e76dddbb6d75c4c5                                          0.0s
 => => resolve docker.io/docker/dockerfile:1@sha256:db1ff77fb637a5955317c7a3a62540196396d565f3dd5742e76dddbb6d75c4c5                                                     0.0s
 => [internal] load build definition from cloud-node-manager-windows-hpc.Dockerfile                                                                                      0.0s
 => WARN: FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 20)                                                    0.0s
 => WARN: FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 27)                                                    0.0s
 => [internal] load metadata for mcr.microsoft.com/oss/kubernetes/windows-host-process-containers-base-image:v1.0.0                                                      0.1s
 => [internal] load metadata for mcr.microsoft.com/oss/go/microsoft/golang:1.23@sha256:f4fc81062796c14e704559cad3748c5db70bf961ef24d5fac798afa18dff300e                  0.1s
 => [internal] load .dockerignore                                                                                                                                        0.0s
 => => transferring context: 150B                                                                                                                                        0.0s
 => [local-build-true 1/4] FROM mcr.microsoft.com/oss/go/microsoft/golang:1.23@sha256:f4fc81062796c14e704559cad3748c5db70bf961ef24d5fac798afa18dff300e                   0.1s
 => => resolve mcr.microsoft.com/oss/go/microsoft/golang:1.23@sha256:f4fc81062796c14e704559cad3748c5db70bf961ef24d5fac798afa18dff300e                                    0.1s
 => [stage-3 1/2] FROM mcr.microsoft.com/oss/kubernetes/windows-host-process-containers-base-image:v1.0.0@sha256:b4c9637e032f667c52d1eccfa31ad8c63f1b035e8639f3f48a5105  0.1s
 => => resolve mcr.microsoft.com/oss/kubernetes/windows-host-process-containers-base-image:v1.0.0@sha256:b4c9637e032f667c52d1eccfa31ad8c63f1b035e8639f3f48a510536bf3403  0.1s
 => [internal] load build context                                                                                                                                        0.7s
 => => transferring context: 2.28MB                                                                                                                                      0.6s
 => CACHED [local-build-true 2/4] WORKDIR /go/src/sigs.k8s.io/cloud-provider-azure                                                                                       0.0s
 => [local-build-true 3/4] COPY . .                                                                                                                                      5.1s
 => [local-build-true 4/4] COPY bin/azure-cloud-node-manager-*.exe bin/                                                                                                  0.7s
 => CACHED [stage-3 2/2] COPY --from=builder /go/src/sigs.k8s.io/cloud-provider-azure/bin/azure-cloud-node-manager-amd64.exe /cloud-node-manager.exe                     0.0s
 => exporting to docker image format                                                                                                                                     0.2s
 => => exporting layers                                                                                                                                                  0.0s
 => => exporting manifest sha256:c53d38e93b265fb601711e04f95232947c74c31598c9f3f6b6585a67a890ae54                                                                        0.0s
 => => exporting config sha256:7f937234c61a4ae8a9bac39766f02423b7f631d728e8c6df01972b28141a6473                                                                          0.0s
 => => sending tarball                                                                                                                                                   0.2s
 => importing to docker                                                                                                                                                  0.0s

 2 warnings found (use --debug to expand):
 - FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 20)
 - FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 27)
  • test build windows hostprocess image without local build
make build-node-image-windows-hpc
docker buildx inspect img-builder > /dev/null 2>&1 || docker buildx create --name img-builder --use
# enable qemu for arm64 build
# https://github.com/docker/buildx/issues/464#issuecomment-741507760
docker run --privileged --rm tonistiigi/binfmt --uninstall qemu-aarch64
uninstalling: qemu-aarch64 OK
{
  "supported": [
    "linux/amd64",
    "linux/riscv64",
    "linux/ppc64le",
    "linux/s390x",
    "linux/386",
    "linux/mips64le",
    "linux/mips64",
    "linux/arm/v7",
    "linux/arm/v6"
  ],
  "emulators": [
    "llvm-14-runtime.binfmt",
    "llvm-17-runtime.binfmt",
    "qemu-arm",
    "qemu-mips64",
    "qemu-mips64el",
    "qemu-ppc64le",
    "qemu-riscv64",
    "qemu-s390x"
  ]
}
docker run --rm --privileged tonistiigi/binfmt --install all
installing: arm64 OK
{
  "supported": [
    "linux/amd64",
    "linux/arm64",
    "linux/riscv64",
    "linux/ppc64le",
    "linux/s390x",
    "linux/386",
    "linux/mips64le",
    "linux/mips64",
    "linux/arm/v7",
    "linux/arm/v6"
  ],
  "emulators": [
    "llvm-14-runtime.binfmt",
    "llvm-17-runtime.binfmt",
    "qemu-aarch64",
    "qemu-arm",
    "qemu-mips64",
    "qemu-mips64el",
    "qemu-ppc64le",
    "qemu-riscv64",
    "qemu-s390x"
  ]
}
docker buildx build --pull \
        --output=type=docker \
        --platform windows/amd64 \
        -t local/azure-cloud-node-manager:fda2cd4-windows-hpc-amd64 \
        --build-arg ARCH=amd64 \
        --build-arg LOCAL_BUILD=false \
        -f cloud-node-manager-windows-hpc.Dockerfile . \
        --provenance=false \
        --sbom=false
[+] Building 144.0s (16/16) FINISHED                                                                                                             docker-container:img-builder
 => [internal] load build definition from cloud-node-manager-windows-hpc.Dockerfile                                                                                      0.0s
 => => transferring dockerfile: 1.81kB                                                                                                                                   0.0s
 => resolve image config for docker-image://docker.io/docker/dockerfile:1                                                                                                0.3s
 => CACHED docker-image://docker.io/docker/dockerfile:1@sha256:db1ff77fb637a5955317c7a3a62540196396d565f3dd5742e76dddbb6d75c4c5                                          0.0s
 => => resolve docker.io/docker/dockerfile:1@sha256:db1ff77fb637a5955317c7a3a62540196396d565f3dd5742e76dddbb6d75c4c5                                                     0.0s
 => [internal] load build definition from cloud-node-manager-windows-hpc.Dockerfile                                                                                      0.0s
 => WARN: FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 20)                                                    0.0s
 => WARN: FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 27)                                                    0.0s
 => [internal] load metadata for mcr.microsoft.com/oss/kubernetes/windows-host-process-containers-base-image:v1.0.0                                                      0.1s
 => [internal] load metadata for mcr.microsoft.com/oss/go/microsoft/golang:1.23@sha256:f4fc81062796c14e704559cad3748c5db70bf961ef24d5fac798afa18dff300e                  0.0s
 => [internal] load .dockerignore                                                                                                                                        0.0s
 => => transferring context: 150B                                                                                                                                        0.0s
 => CACHED [stage-3 1/2] FROM mcr.microsoft.com/oss/kubernetes/windows-host-process-containers-base-image:v1.0.0@sha256:b4c9637e032f667c52d1eccfa31ad8c63f1b035e8639f3f  0.1s
 => => resolve mcr.microsoft.com/oss/kubernetes/windows-host-process-containers-base-image:v1.0.0@sha256:b4c9637e032f667c52d1eccfa31ad8c63f1b035e8639f3f48a510536bf3403  0.1s
 => [local-build-false 1/4] FROM mcr.microsoft.com/oss/go/microsoft/golang:1.23@sha256:f4fc81062796c14e704559cad3748c5db70bf961ef24d5fac798afa18dff300e                  0.1s
 => => resolve mcr.microsoft.com/oss/go/microsoft/golang:1.23@sha256:f4fc81062796c14e704559cad3748c5db70bf961ef24d5fac798afa18dff300e                                    0.1s
 => [internal] load build context                                                                                                                                        0.7s
 => => transferring context: 961.44kB                                                                                                                                    0.6s
 => CACHED [local-build-false 2/4] WORKDIR /go/src/sigs.k8s.io/cloud-provider-azure                                                                                      0.0s
 => CACHED [local-build-false 3/4] COPY . .                                                                                                                              0.0s
 => [local-build-false 4/4] RUN make bin/azure-cloud-node-manager.exe ENABLE_GIT_COMMAND=true ARCH=amd64                                                               135.7s
 => [stage-3 2/2] COPY --from=builder /go/src/sigs.k8s.io/cloud-provider-azure/bin/azure-cloud-node-manager-amd64.exe /cloud-node-manager.exe                            1.4s
 => exporting to docker image format                                                                                                                                     4.9s
 => => exporting layers                                                                                                                                                  4.5s
 => => exporting manifest sha256:d64ba6cb6c56fb3cff2bc94758bf51203bf341dcf36ac8bbdb9308ec1a82a55a                                                                        0.0s
 => => exporting config sha256:9d6fb0c86fb834c5d30b0281acc2f75cbd10cb0e32a74f5634b2416a8563744d                                                                          0.1s
 => => sending tarball                                                                                                                                                   0.3s
 => importing to docker                                                                                                                                                  0.0s

 2 warnings found (use --debug to expand):
 - FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 20)
 - FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 27)

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?

NONE

Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-kind labels Dec 13, 2024
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Dec 13, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @mainred. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Dec 13, 2024
@mainred
Copy link
Contributor Author

mainred commented Dec 13, 2024

cc @feiskyer @andyzhangx

@andyzhangx
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 13, 2024
@MartinForReal
Copy link
Contributor

/kind testing

Copy link
Member

@andyzhangx andyzhangx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 16, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx, mainred

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 16, 2024
@andyzhangx
Copy link
Member

do we need to make similar changes to azure disk & file CSI driver repos?

@mainred
Copy link
Contributor Author

mainred commented Dec 16, 2024

@andyzhangx we may need to hold this PR because MCR pipelines relies on building the binary out of the dockerfile to sign the binary.

@mainred mainred changed the title chore: integrate binary build in windows dockerfile [DONTMERGE]chore: integrate binary build in windows dockerfile Dec 16, 2024
@mainred
Copy link
Contributor Author

mainred commented Dec 16, 2024

We can merge this PR after we migrating image building pipeline to Dalec since Dalec does not rely on dockerfile to build the image.

@andyzhangx
Copy link
Member

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 16, 2024
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 16, 2024
@k8s-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 16, 2024
@mainred
Copy link
Contributor Author

mainred commented Dec 16, 2024

@feiskyer @andyzhangx , we now support building windows binary from local env or in the dockerfile, and after this PR is merged, we can update the mcr pipeline to turn on local build.

@mainred mainred changed the title [DONTMERGE]chore: integrate binary build in windows dockerfile chore: integrate binary build in windows dockerfile Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/testing ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants