HIPE for elixir alpine

Hello guys,
I am trying to run an application in docker using elixir:alpine. The system requires HIPE but unfortunately the erlang vm does not boot with HIPE when I run elixir:alpine in interactive mode. This causes the system to crush at boot time.
Is there a way to add HIPE to elixir:alpine and if not how to I solve this problem?

Thanks

Hi,

Do you absolutely have to run alpine ? Does HIPE run with a more “standard” base in docker ?

Which Erlang version are you using? Newer Erlang releases do not fully support HIPE and it is marked to be removed in future as maintaining it is too costly.

1 Like

This is my first deployment with docker and from my online search, alpine versions are lightweight and preferred for production deployment. This lead to my decision.

Yes hipe works with standard elixir in docker. The down side is the standard docker image is 1.2 gb in size as compared to alpine’s 80 mb. I am guessing this might was not built for production. And I might be wrong

Erlang version 23.
HiPE is ignored when I pass the command ERL_COMPILER_OPTIONS=“native” mix compile.

1 Like

libmusl does not have all the features that HiPE needs so it cannot run on alpine.

4 Likes

We finally moved away from alpine completely and used the latest elixir version and we didn’t have any problems with the erlang vm.

Did you manage to keep a low build size ?

The size of the resulting image nowadays do not matter much, as we have OverlayFS. So imagine that you fetch 2 images that base on 1.2 GiB example image and contain application (in one layer) that is 200 MB each. So in the end you will download base image only once, and each time afterwards you will need to fetch only the changed layers. It works similarly to git pull where you fetch only the new commits.

1 Like