shipwright-io / build

Shipwright - a framework for building container images on Kubernetes
https://shipwright.io
Apache License 2.0
640 stars 109 forks source link

Support for building Windows Containers #834

Open ashokponkumar opened 3 years ago

ashokponkumar commented 3 years ago

Just was wondering whether shipwright supports windows containers, and if not, is there a plan to support windows containers.

Also, if it is not supported, is there a doc explaining the challenges in adding support for windows containers, and steps we need to follow to evaluate the effort required.

qu1queee commented 3 years ago

hey @ashokponkumar good question. It really depends on the tools we use, like kaniko, buildkit, buildpacks. I know building for windows containers is not supported at least in Kaniko and Buildkit. I will need to investigate more. But as mentioned, the support needs to be done in the tooling side.

The doc is a good idea, Im moving this to our next community meeting. If you want to join there and be part of the discussion, see https://github.com/shipwright-io/build#community-meetings

ashokponkumar commented 3 years ago

Thanks @qu1queee. Will look at attending the next community call.

sbose78 commented 3 years ago

From grooming: @imjasonh to add more details, assigned.

sbose78 commented 3 years ago

Noticed this work by Jason https://github.com/google/ko/commit/690533235ad4209fab6c88f44314760b102ce829

imjasonh commented 3 years ago

Hey, sorry for the delay in responding to this.

If the question is whether Shipwright can run builds on Windows nodes, the answer is not yet. For that we'll need Tekton to support Windows (https://github.com/tektoncd/pipeline/issues/1826), which is blocked on the build tool it uses supporting building Windows containers, which as @sbose78 notes has recently made progress in https://github.com/google/ko/pull/374.

Beyond that, Tekton will have to actually build Windows images, and beyond that might still need to make some changes before it can successfully execute TaskRuns on Windows nodes.

When Tekton can do that, Shipwright can start to expose support for that as well, possibly using nodeSelectors, etc., like Tekton does. Shipwright would also have to either support (or document lack of support for) Windows in its default build strategies -- buildpacks and ko will support Windows, but I'm not sure about s2i, buildah, kaniko, etc. If you're writing your own strategy it would be up to you whether it supports Windows.

So in short: it's complicated (😅) and it'll probably be a long time before Windows support is fully piped through the stack.

adambkaplan commented 2 years ago

Marking this as a "frozen" issue and accepting into the general backlog. As noted @imjasonh, we are blocked until Tekton is able to support Windows nodes/containers.