Consider building openshift binaries with CGO_ENABLED=0
@smarterclayton is already working on this.
Since Apr 21, 2017.
- Dominant language
- Go
- Stars
- 8.7k
- Forks
- 4.8k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 53
Description
Currently the binaries produced by the release process seem to depend on the particular libc used to build them (most likely glibc). This makes them not work in Linux distros with musl (or other alternative libcs), such as Alpine.
I don't pretend to know enough Go to entirely understand the ramifications of this - but given that the build is almost static now, and building with CGO_ENABLED=0 seems to drop the binary size (from 283M to 257M) - would you consider tweaking the release process to make fully static binaries?
Version
[provide output of the openshift version or oc version command]
Steps To Reproduce
- Download the openshift binary from github releases
- Try to run it in alpine linux
Current Result
/bin/sh: openshift: not found
This is because it's looking for glibc and failing to find it.
Expected Result
Prints usage and exits.
Additional Information
https://github.com/openshift/source-to-image/issues/727 is similar and targetted at s2i
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.