Re:Self-Contained Pure-Go Web Server with Lua, MD, HTTP/2, Q...
by yetanotherme on Friday April 05, 2019 @12:47AM
(#19579783)
True. Luckily, most Go binaries can be upx'd ( https://upx.github.io/ ) for a fraction of their original size. Just put it into your Dockerfile as a part of the build process.
Re:Self-Contained Pure-Go Web Server with Lua, MD, HTTP/2, Q...
by penagwin on Friday April 05, 2019 @09:55AM
(#19582483)
This works and helps with storage/transit. Word of warning though that many AV like to flag UPX'd executables (only important if it's not an internal tool), and it'll take even longer for it to start, and will use more memory. My understanding is it essentially does standard compression on the executable and appends the decompression part on the front of it.
- it increases amount of storage to store multiple versions of containers (when you have an internal app and do frequent releases it adds quickly)
- it increases amount of data transferred on every deployment
- increases amount of memory used (the whole point of containers, was to efficiently use hardware (BORG), although a lot of people today miss that reason and run containers on VMs)