D4no0

D4no0

I am trying to use docker images built by bob and uploaded to dockerhub in the hexpm repo in combination with gitlab runners to automate tests and thing like credo. I have exqlite in my project and it is compiled from source at the moment.

I have tried to use several images so far:

  • hexpm/elixir:1.15.5-erlang-26.0.2-ubuntu-focal-20230126
  • hexpm/elixir:1.15.5-erlang-26.0.2-debian-bullseye-20230612-slim

It seems that none of these images contains the utilities like make to build from source. I was able to fix this by installing build-essentials manually, however I am not a big fan of this solution.

Is this the expected behavior? Shouldn’t these images contain all the prerequisites for building elixir projects?

Showing Posts 1 to 10

LostKobrakai

LostKobrakai

No, they contain the minimal code required to have erlang and elixir run on top of their base OS images. They don’t contain build tooling by design.

D4no0

D4no0 OP

There seems to be some difference between docker images hosted in elixir dockerhub repo and hexpm ones. I only started to get this problem after switching to hexpm.

LostKobrakai

LostKobrakai

Yes. The elixir ones started as community contributions and are now maintained by the EEF, the hexpm ones are build by hex bob automation.

But really you don’t want build tooling in docker images, which are meant to run in production and that’s what the hexpm ones are for. You can use them in CI and install build tools manually or build on top of them / use other images, which come with build tools installed. I however don’t think build tools installed is a good default for docker images.

D4no0

D4no0 OP

I’m not sure what would be the benefit of running images with elixir and erlang preinstalled instead of a release. Even if you take a look at Dockerfile generated by phoenix with phx.gen.release, the hexpm image is just used for building the project.

LostKobrakai

LostKobrakai

You’d be surpised how often people don’t run releases, even if it’s not best practise.

Also even if you include built tools. Where do you start, where do you stop. hexpm build for multiple OSes, so using the os default will yield different results. Using a custom subset also needs (additional) maintenance across OSes. Now make might sound simple, but then people might want to compile rustler dependencies and need rust/cargo, …. I personally find it cleaner to just add erlang/elixir to the base images and leave the rest to the users, who actually knows what they need.

D4no0

D4no0 OP

Makes sense, I think the system for compilation of native files is kind of a workaround currently and could be improved greatly.

LostKobrakai

LostKobrakai

Yeah, I’d love to see zig being adopted more to compile NIFs.

D4no0

D4no0 OP

Yeah, we’ve talked before about this here.

I am planning to participate with this idea on an upcoming hackaton (can’t remember the name, something overflow), basically using the same approach tailwind is using currently with a mix of the options provided by burrito.

warmwaffles

warmwaffles

I saw mention of exqlite and thought I introduced a bug. But for exqlite to work with your base image you will need to apt-get install dependencies. There are precompiled binaries already with the release so it shouldn’t be necessary.

D4no0

D4no0 OP

This is strange, because it always compiles from source, is there some special option that needs to be passed?

I am using it from the dependency ecto_sqlite3.

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
Aludel - LLM Evaluation Workbench Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews