If I want to develop a Phoenix project and build a release specifically for Ubuntu 18.04 (bionic), Erlang 22 and Elixir 1.10.2 in Docker container and I’m looking for an image to base my Dockerfile from what is my best option?
I’ve read a topic on this forum that hexpm published docker images for all erlang and elixir versions. I went to docker hub and found hexpm/elixir:1.10.2-erlang-22.2-ubuntu-bionic-20200219 image.
Seems exactly what I need, but I’m not sure because in the description of the image I don’t see what’s installed, the layers add some file and copy some dir, that’s basically it.
The link to the image: https://hub.docker.com/layers/hexpm/elixir/1.10.2-erlang-22.2-ubuntu-bionic-20200219/images/sha256-365b4ff8cf345bb1e7909cd0e00af4686cddc0d04fffdc6bd2f0decd2544763f?context=explore
Besides Elixir code I need to build some c code in the container (bcrypt is used) and a webpack stuff for Phoenix, so is it enough to just make a Dockerfile like this:
FROM hexpm/elixir:1.10.2-erlang-22.2-ubuntu-bionic-20200219 RUN apt-get update && \ apt-get install -y postgresql-client && \ apt-get install -y inotify-tools && \ apt-get install -y nodejs && \ curl -L https://npmjs.org/install.sh | sh && \ mix local.hex --force && \ mix archive.install hex phx_new 1.5.3 --force && \ mix local.rebar --force ENV APP_HOME /app RUN mkdir $APP_HOME WORKDIR $APP_HOME CMD ["mix", "phx.server"]
or I should add more tooling? Or I shouldn’t use this image for my purpose and start building my image from scratch? I’m new to docker, so have many doughts.