container-structure-test
container-structure-test copied to clipboard
Can this tool run on Windows?
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.
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?
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.
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.
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
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?