Skip to content

Add simple Alpine-based variant #40

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

Merged
merged 1 commit into from
Jan 8, 2016
Merged

Conversation

tianon
Copy link
Contributor

@tianon tianon commented Jan 4, 2016

No description provided.

@Starefossen Starefossen mentioned this pull request Jan 7, 2016
@yosifkit
Copy link
Contributor

yosifkit commented Jan 8, 2016

I built this version that uses gosu and the duplicate that uses su-exec and the size difference is only minor:

$ docker images redis
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
redis               3-alpine-gosu       574ba9032328        12 seconds ago      15.94 MB
redis               3-alpine-su         ccab53ee1294        3 seconds ago       13.52 MB

I'd rather stick with the known gosu, since it is already prevalent in the official images and has versioned releases for easy upgrade on bugs.

yosifkit added a commit that referenced this pull request Jan 8, 2016
Add simple Alpine-based variant
@yosifkit yosifkit merged commit c31cf95 into redis:master Jan 8, 2016
@yosifkit yosifkit deleted the alpine branch January 8, 2016 00:42
@ncopa
Copy link

ncopa commented Jan 8, 2016

i wrote su-exec because I thought gosu was unnecessarily bloated ;) gosu is bigger than busybox and apk-tools together. I would prefer to use su-exec in the alpine images if possible.

@tianon
Copy link
Contributor Author

tianon commented Jan 29, 2016

I'm not opposed to switching to su-exec, but for the official images, consistency is much more important than bloat. If su-exec can be shown to be easily installable in all the cases where gosu currently is (pre-compiled static binaries are available for a large number of architectures), and can be shown to be completely feature equivalent (since gosu was written in Go specifically to be able to leverage the exact code Docker itself uses for parsing user:group strings), then we can evaluate switching.

@ncopa
Copy link

ncopa commented Feb 11, 2016

su-exec is completely feature equivalent. It handles all the user:groupcases mentioned in
https://github.com/opencontainers/runc/blob/master/libcontainer/user/user.go#L230 I did test all the possible cases I could think of and compared with gosu.

Not sure how far it make sense to pull this consistency thing. I mean, we don't port apt-get to alpine just to be consistent. The gosu tool was made because the tools provided on debian systems didn't do what we need it to. Ideally that tool should be upstreamed so you can apt-get install gosu. On alpine you can apk add su-exec for the exact same functionality.

@wol4max
Copy link

wol4max commented Feb 11, 2016

I agree with @ncopa on this. One of the key goals of Alpine is to reduce bloat. And introducing list specific optimizations is perfectly OK. My vote is to go with su-exec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants