-
Notifications
You must be signed in to change notification settings - Fork 541
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
Supporting Alpine Linux #1533
Supporting Alpine Linux #1533
Conversation
see minio/mc#1533 for background on the Alpine Linux compatibility issue. the builder script simply takes advantage of the -C flag to indicate where the config data lives
Thanks for trying out 'mc' in docker. The right fix is to use - https://github.com/minio/minio/blob/8046b24b975a26d659bda12797a30631bb427e8f/utils.go#L63 - which we did with our minio server. Can you bring this change in this patch? |
Following change needs to be incorporated into your diff. @arschles - This way it will work in a portable way.
|
see minio/mc#1533 for background on the Alpine Linux compatibility issue. the builder script simply takes advantage of the -C flag to indicate where the config data lives
following this discussion: minio#1533 (comment) this change adds support for running binaries built with CGO_ENABLED, and also adds detection and a workaround for running inside docker containers
@harshavardhana thanks for the direction. I ported the code that you suggested and it looks like the code already has the pertinent changes in the diff you pasted. I've also merged from |
see minio/mc#1533 for background on the Alpine Linux compatibility issue. the builder script simply takes advantage of the -C flag to indicate where the config data lives
@arschles - can you squash these commits into single change? |
Thanks for your work. |
https://github.com/minio/minio/blob/8046b24b975a26d659bda12797a30631bb427e8f/utils.go#L63 removing debug output porting userCurrent code from minio following this discussion: minio#1533 (comment) this change adds support for running binaries built with CGO_ENABLED, and also adds detection and a workaround for running inside docker containers contentType: use contentDB package from server. fs: Make sure to negate the seeked offset if size is not negative. Maintainers document updated.
@harshavardhana I wasn't paying attention to what I was doing and messed up the squash. I'll open a new PR for this change |
I tried to build
mc
for Alpine Linux (inside analpine:3.1
docker container). As these instructions say, musl doesn't support theos/user
package yet. As this program usesos/user
to get the home directory (to get the config file), Alpine builds fail at runtime, even when-C
is passed via the CLI.Right now, this PR removes the entire dependency on
os/user
, but the final version could use build constraints to toggle usage ofos/user
. Or perhaps there's an easier way to get this working that I haven't thought of. Thoughts?