Re: package mix release works, port doesn't? (and neither is self-contained)

From: Pat Maddox <>
Date: Thu, 05 May 2022 06:48:48 UTC
On 4 May 2022, at 7:16, Dave Cottlehuber wrote:

> On Wed, 4 May 2022, at 11:16, Pat Maddox wrote:

>> I still don’t understand why I need an erlang runtime at all 
>> though,
>> after the mix release has been built.
>> Pat
> you don't; whether erts is bundled in the release is defined in your
> mix release config. I'm assuming your ExAmple app picks up whatever
> the default is, see the hello app for an appropriate example.
> &
> I've tried both approaches in the past, and now I always bundle
> erts within the application.
> You do need to run the epmd daemon somewhere, this is easily
> enough done via including lang/erlang as a package dependency,
> or via your CI/CD deployment tools, and starting the epmd service
> that is provided on FreeBSD.


according to the mix release docs 

“If mix release is invoked and there are no names, a release using the 
application name and default values is assembled.”

“Releases do not even require Erlang or Elixir in your servers, as it 
includes the Erlang VM and its runtime by default.”

“:include_erts ... The default is true, which is also the recommended 

My point is that I don’t think I should have to install lang/erlang to 
run the mix release - that’s part of the point of mix release, is to 
provide everything needed to run the app, no additional runtimes 

It’s also different behavior than I see on ubuntu, where we mix 
release, copy the dir to a fresh image (no elixir or erlang) and it runs 

I’m definitely missing something here.