apko
apko copied to clipboard
WIP: support building from Windows
Following up from https://github.com/chainguard-dev/apko/pull/536, this is a brief attempt to hide unix-isms behind Go build flags so that we can build apko for Windows.
~~There's one more, here, that I can't easily snip out:~~ https://github.com/chainguard-dev/apko/blob/89912f3e264800286f641cf86eeee367db1723ea/pkg/vfs/vfs.go#L34
edit: vfs.go appears to be unused by apko itself. Or at least, even with this not de-unix-ed, make apko passed on Windows. 🤔
If we think we care about Windows I think we're within throwing distance of it. If it's not worth it we can close this PR and carry this unspeakable horror to our graves.
With this change, the apko binary builds for Windows, but it fails to run on Windows:
Error: failed to build layer image: initializing apk: failed to initialize apk database: failed to create file /etc/apk/world: stat etc\apk: file does not exist
2023/02/24 22:02:08 error during command execution: failed to build layer image: initializing apk: failed to initialize apk database: failed to create file /etc/apk/world: stat etc\apk: file does not exist
https://github.com/imjasonh/apko/actions/runs/4266567359/jobs/7427240260