container-structure-test icon indicating copy to clipboard operation
container-structure-test copied to clipboard

Can this tool run on Windows?

Open tqa236 opened this issue 5 years ago • 5 comments

As the title indicates, I would like to know if this tool supports Windows or is there any plan to support Windows in the future? If yes, is there an example somewhere about how to install and run it on Windows?

Thank you very much.

tqa236 avatar Jun 18 '19 08:06 tqa236

I'd also like to know :) it looks like it's written in go so I think it should be possible? But I don't really know

EDIT: I was able to compile this on Windows pretty easily, actualy

go get github.com/sirupsen/logrus
go get github.com/GoogleContainerTools/container-structure-test/cmd/container-structure-test/app
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build ./cmd/container-structure-test/

Seems to work just fine. Any reason it isn't officially supported?

sparky005 avatar Oct 01 '19 20:10 sparky005

in theory there isn't anything stopping it from being possible, but the release infrastructure we have isn't set up to build a Windows binary so we'd have to rework the release pipeline. we also don't have any Windows tests so we can't guarantee that everything will work perfectly, but if you'd like to compile from source and try it out for yourself let us know how it goes!

EDIT: @sparky005 I should have refreshed before I commented :) when I first wrote the tool we didn't have a Windows environment to test on, and the release platform we were using didn't support cross compiling. at some point in the future we could update to officially support it, but I'm not currently working on this tool right now.

nkubala avatar Oct 08 '19 17:10 nkubala

all good @nkubala :) so far it seems to work just fine. though as a note for fileExistenceTests, using backslashes (\) always fails. You have to use forward slashes (/). Mildly confusing for a Windows admin but hardly a show stopper.

sparky005 avatar Oct 10 '19 19:10 sparky005

ended up creating docker image for windows (and ubuntu)
https://github.com/3shape/containerized-structure-test https://hub.docker.com/r/3shape/containerized-structure-test

jetersen avatar Nov 18 '19 20:11 jetersen

Since v1.10.0 Windows binary are distributed as well.

Now, as most tests contain specific architecture paths, I'm currently adding a specific Windows version of cst configuration file as a workaround. Is there a better solution by any chance?

lemeurherve avatar May 13 '22 12:05 lemeurherve