3 ms·
But the article says you have to run the release on the same OS/version that you built it on. So if you're running it on alpine, won't you need to build it on a
by timwis 7y ago
But the article says you have to run the release on the same OS/version that you built it on. So if you're running it on alpine, won't you need to build it on alpine, which suggests you'll need to configure your Dockerfile to compile it anyway?
- jschniper 7y agoWith Distillery you can specify a directory for the ERTS so the release can be built on one OS and run on another. You just have to make sure ERTS was built on the OS that it will eventually run on.
- arvidkahl 7y agoThat is correct. But that can be multiple stages, and therefore separated concerns. Also, releases can be very small, after all the superfluous parts/symbols are stripped. Combine that with a fresh alpine image and you have quick-to-deploy containers.
- josevalim 7y agoYou would have two images, one with all compile time dependencies, sources, etc, which you use to assemble the release, and another image with only the artifact (the release) and none of the rest. Hex (Elixir's package manager) is open source and uses this approach, which you can see here: https://github.com/hexpm/hexpm/blob/d015973e472af59644ee537f809cb004f284139b/Dockerfile#L62:L73 https://github.com/hexpm/hexpm/blob/d015973e472af59644ee537f...