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

install.md: add Windows static build example #1833

Closed

Conversation

christian-korneck
Copy link

This adds an example to install.md how to build a static skopeo.exe on Windows. Remote registry functionality seems to be working fine on Windows.

Examples where this might be useful:

  • There aren't many options to run Windows containers, one of the more popular ones is to use Docker Desktop which can either be in Linux or Windows mode. In Windows mode a Skopeo Linux container can't be used.
  • when only using a Windows Docker or containerd build (which can only run Windows containers, so again no Skopeo Linux container).

@TomSweeneyRedHat
Copy link
Member

Looks OK to me, but I don't have a Windows box that I can easily test this on.

Copy link
Contributor

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

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

Thanks!

I don’t think it makes much sense to me to provide a for /f … script in the middle of installation instructions, only in the non-recommended static case.

Most of #715 likely still applies — the default paths and the like are probably not a good fit for Windows. It seems to me that looking into the functionality and integration should happen before widely publicizing a way to install the binary.

I’m not at all sure what the functional status of Skopeo on Windows is, but I think we need to figure that out first (and to see what we can or can not document as working), before deciding whether it even makes sense to document installation, let alone a specific installation method.


If we are to have Windows installation instructions, I’d expect the documentation to first have Windows instructions for the “recommended” approach, in some long-term maintainable form that isn’t too likely to break without anyone noticing.

And then the non-recommended approach (if it needs to be documented at all) should, to the extent possible, defer to the recommended-approach tooling.

#715 seems to have settled on using mingw32-make for that purpose (and that would naturally extend to just using make … CGO_ENABLED=0 … for the “static build” case); I have no idea whether that is practical, but it at least seems less likely to break than a Windows-specific script that only exists as text within a document.


Also, placing this text in the middle of fairly Linux-specific text talks would make the impression that the Windows build have similar properties; e.g. the random crashes due to ABI incompatibilities might not be a concern on Windows (or at least not as much as on Linux?), and the links about context are not relevant to Windows either.

@christian-korneck
Copy link
Author

@mtrmac Thanks for the feedback.

Most of #715 likely still applies — the default paths and the like are probably not a good fit for Windows. It seems to me that looking into the functionality and integration should happen before widely publicizing a way to install the binary.

Thanks for mentioning this, I wasn't aware of #715. I'm closing this PR as there's already Windows work happening.

I don’t think it makes much sense to me to provide a for /f … script in the middle of installation instructions, only in the non-recommended static case.

This isn't important going forward, just for completeness if someone ends up reading this thread: This was only about making a static build. The code block just repeats the Linux static build instructions from above in a win cmd shell (essentially just a go build ... line and some some env vars). Intended as contrib info, not install instructions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants