skynetservices / skydns1

DNS for skynet or any other service discovery
MIT License
528 stars 54 forks source link

compression questionszzzz #98

Closed pirog closed 9 years ago

pirog commented 9 years ago

oh EHLO there,

so we are using skydns1 (hopefully skydns2 soon) and skydock as part of the kalabox project over here at https://github.com/kalabox/kalabox. along with dnsmasq and hipache they constitute the "core containers" the kalabox has running at all times. to cut to the chase we are trying to minimize the time that it takes to initially pull/build/run these services. rebasing everything on debian:wheezy and using docker-squash cuts a substantial amount of MB from the process however all the sky* services based on the crosbymichael/golang image seem to be quite large.

I noticed that the initial @crosbymichael skydns1 image on docker hub/registry is only 137.5MB yet the build of skydns1 from repo here is ~450MB. The initial @crosbymichael image doesnt have a dockerfile that i can find online so im not sure if there is some sort of clean up or compression algorithm that happens before the image is pushed to the registry. I also don't know a ton about go.

Is there a way to trim some fat on skydns and skydock so they are closer to the @crosbymichael image size of 137MB?

For ref on some benchmarking on what we are trying to do please check: https://github.com/kalabox/kalabox-issues/issues/109

don't need a lengthy assist here but being pointed in the right direction would be happy happy joy joy.

miekg commented 9 years ago

[ Quoting notifications@github.com in "[skydns1] compression questionszzzz..." ]

oh EHLO there,

so we are using skydns1 (hopefully skydns2 soon) and skydock as part of the kalabox project over here at https://github.com/kalabox/kalabox. along with dnsmasq and hipache they constitute the "core containers" the kalabox has running at all times. to cut to the chase we are trying to minimize the time that it takes to initially pull/build/run these services. rebasing everything on debian:wheezy and using docker-squash cuts a substantial amount of MB from the process however all the sky* services based on the crosbymichael/golang image seem to be quite large.

I noticed that the initial @crosbymichael skydns1 image on docker hub/registry is only 137.5MB yet the build of skydns1 from repo here is ~450MB. The initial @crosbymichael image doesnt have a dockerfile that i can find online so im not sure if there is some sort of clean up or compression algorithm that happens before the image is pushed to the registry. I also don't know a ton about go.

Is there a way to trim some fat on skydns and skydock so they are closer to the @crosbymichael image size of 137MB?

For ref on some benchmarking on what we are trying to do please check: https://github.com/kalabox/kalabox-issues/issues/109

don't need a lengthy assist here but being pointed in the right direction would be happy happy joy joy.

I dont know what accounts to the size difference, but I'm happy to base it of something else that might be smaller.

/Miek

Miek Gieben

pirog commented 9 years ago

The golang container seems to be the heaviest part but obviously its mission critical.

Might try to compile the binary this way and then send out to a smaller container. I think this is probably something like what mc did.

Will let you know results

On Monday, December 15, 2014, Miek Gieben notifications@github.com wrote:

[ Quoting <notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> in "[skydns1] compression questionszzzz..." ]

oh EHLO there,

so we are using skydns1 (hopefully skydns2 soon) and skydock as part of the kalabox project over here at https://github.com/kalabox/kalabox. along with dnsmasq and hipache they constitute the "core containers" the kalabox has running at all times. to cut to the chase we are trying to minimize the time that it takes to initially pull/build/run these services. rebasing everything on debian:wheezy and using docker-squash cuts a substantial amount of MB from the process however all the sky* services based on the crosbymichael/golang image seem to be quite large.

I noticed that the initial @crosbymichael skydns1 image on docker hub/registry is only 137.5MB yet the build of skydns1 from repo here is ~450MB. The initial @crosbymichael image doesnt have a dockerfile that i can find online so im not sure if there is some sort of clean up or compression algorithm that happens before the image is pushed to the registry. I also don't know a ton about go.

Is there a way to trim some fat on skydns and skydock so they are closer to the @crosbymichael image size of 137MB?

For ref on some benchmarking on what we are trying to do please check: https://github.com/kalabox/kalabox-issues/issues/109

don't need a lengthy assist here but being pointed in the right direction would be happy happy joy joy.

I dont know what accounts to the size difference, but I'm happy to base it of something else that might be smaller.

/Miek

Miek Gieben

— Reply to this email directly or view it on GitHub https://github.com/skynetservices/skydns1/issues/98#issuecomment-67121590 .

Cheers,

Mike Pirog Kalamuna www.kalamuna.com

pirog commented 9 years ago

doing a little docker inception a la http://blog.xebia.com/2014/07/04/create-the-smallest-possible-docker-container/

ending up with a skydns image around 10MB!