-
Notifications
You must be signed in to change notification settings - Fork 345
Reduce size of go image #21
Comments
I cannot get the latest go running on alpine. Tried for a few hours, postponing now.
|
Still tinkering with this but I was able to get it from ~1.4GB down to 745mb. Going to dig deeper, but as you can see below, the theia app is ~173mb, Go is 264mb and the installed go deps are ~ 240mb. I'm going to explore perhaps statically compiling all the go deps (but i dont think this will work), and see what I can slim out of the go install itself but am not hopeful as golang:1.9-alpine is 269mb on it's own. Not sure I can get it much smaller. I'll stick the Dockerfile etc up once I am done tinkering.
|
Ok this is pretty untested though it worked on my local, I'm going to build it and stick it up on my server for more testing. |
Link not working for me |
Yes sorry moved that into a docker branch on my fork so that automated builds I was working on for the master branch wouldn't break and so i could always rebase to upstream master. Fair warning, the items in the docker branch as in a state of semi broken flux. feel free to look around but no guarantees on anything building. my Work is heaving right now (writing reviews for a team of 20) and I should be able to look at docker again in a week or so. https://github.com/zate/theia/tree/docker is the branch. Anything outside of theia-go-docker is likely to be broken. Current dockerfile in that folder is me trying to automate a multistage build from a bare alpine for everything, not just go. The last go specific build I did is I think this one https://github.com/Zate/theia/blob/docker/theia-go-docker/Dockerfiles.experiments/Dockerfile.next Mostly i just squashed as man RUN elements into a single layer as I could. |
@akosyakov I think there's a way to compress it - using the current image. By putting some stuff on a single layer. I'll do a PR about it. |
This contribution has been automatically marked as stale due to inactivity, and it will be closed if no further activity occurs. Thank you for contributing to Theia! |
See for the guidance: #14 (comment)
The text was updated successfully, but these errors were encountered: