openshift / origin

Conformance test suite for OpenShift
http://www.openshift.org
Apache License 2.0
8.47k stars 4.7k forks source link

Consider building openshift binaries with CGO_ENABLED=0 #13849

Open yuvipanda opened 7 years ago

yuvipanda commented 7 years ago

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
  1. Download the openshift binary from github releases
  2. 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

liggitt commented 7 years ago

cgo is required for Kerberos/gssapi support in the cli client, not sure what else in the server binary

openshift-bot commented 6 years ago

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

openshift-bot commented 6 years ago

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten /remove-lifecycle stale

smarterclayton commented 6 years ago

/lifecycle frozen

On Wed, Mar 14, 2018 at 1:12 PM, OpenShift Bot notifications@github.com wrote:

Stale issues rot after 30d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle rotten /remove-lifecycle stale

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/openshift/origin/issues/13849#issuecomment-373101865, or mute the thread https://github.com/notifications/unsubscribe-auth/ABG_p7c1NiUvMSn6UzAVBREkeQB9WRWLks5teU9xgaJpZM4NDoDa .