die-net / fotomat

Fast Go-based library and server for resizing JPEG, PNG, GIF, and WebP images.
Apache License 2.0
70 stars 15 forks source link

Investigate making a static binary #7

Closed aaron42net closed 8 years ago

aaron42net commented 8 years ago

Is it possible to build a static binary for Linux x86-64? The dependencies are kind of a pain to get installed.

Barring that, how about bundling everything in something like AppImage?

aaron42net commented 8 years ago

As of d03aedae51946ac490dea8e7044b36ebc003f876, passing -tags static to a Fotomat go get, go build, or go install will try to build a static binary.

Unfortunately on Debian Jessie, libxml2-dev doesn't include a static library and is a hard requirement of VIPS. And on CentOS 6, neither ImageMagick-devel nor libwebp-devel include static libraries, which would require dropping at least GIF and WebP support.

Instead, I'll look at making binary packages that'll work on various versions of Linux.

aaron42net commented 8 years ago

Now shipping binary packages with releases v2.2 and above.

I'll need to make proper source packages instead of this Docker-based hack at some point, but I might be able to delay that until VIPS 8.2.2 and Go 1.5.3+ are available on our target distros.

Closing for now.