helium / rosetta-helium

Rosetta implementation for helium
18 stars 4 forks source link

Further Docker image optimization #2

Closed syuan100 closed 3 years ago

syuan100 commented 3 years ago

I've been able to get the docker image down to about 600MB for now using the erlang alpine image. Docker is not my strong suit, so would appreciate if someone could take look and further optimize how it's current constructed.

rsnodgrass commented 3 years ago

I believe gcc and go are not necessary in the final package, since both are for compiling the binaries and aren't needed at runtime.

rsnodgrass commented 3 years ago

I've cut it down to about 245MB, will submit PR shortly.

syuan100 commented 3 years ago

Will take a look now, thanks for reviewing!

rsnodgrass commented 3 years ago

If gcc can be pulled out of the runtime Docker image build, this would save another 150-200MB or so. This is the last of the "low hanging fruit" and diminishing value in making the image smalelr.

syuan100 commented 3 years ago

I haven't tried, I was was mostly making sure that everything would compile, but yeah since gcc is a build tool I might try pulling it out to see how it works.