Phoenix 1.4.0 Docker image?

docker
phoenix

#1

Is anyone aware of a Phoenix 1.4.0 Docker image?


Phoenix 1.4.0 released!
#2

What for?

Just use any elixir enabled dockerfile and build the release on that, move the release to any erlang enabled image after that and run them there (or if you included ERTS you could try to go even FROM scratch or other minimal containers without erlang preinstalled).

If though you want to simply run mixh phx.server, you still can use any elixir enabled image. There is no need for a special phoenix 1.4 image.

Of course you might need to provide additional dependencies like node on the build stage etc.


#3

Of course yes, I had a problem before because dev machine was using 1.4@headrev when 1.3.x was the current release. When I built the Docker image, it used 1.3.x and failed. I shouldn’t have that problem anymore because the versions will be the same.


#4

Then you probably had not properly constrained your requirements in your mix.exs.


#5

I don’t install phoenix for you, but I make it pretty damn easy. I keep it pretty up to date if you are into that kind of thing, and have some updates to push this week.


#6

It wasn’t a compile-time error, but a runtime error, so no, I don’t think so.
edit –
here is the link:


#7

As I said, I’m not a friend of those images.

Just start with a bare elixir or node image and install the other, do not pull in under any circumstances phx_gen into that image.

Don’t install any archive in that image besides hex and rebar via their corresponding local commands.


#8

Sure, you have a decent point there. Thanks.


#9

If you’re looking for an up to date Dockerfile for the latest Elixir, you might want to look at https://github.com/nickjj/docker-web-framework-examples/tree/master/phoenix.

It happens to have an example Phoenix 1.4 app (with Webpack support) generated in the repo as well. It’s a ready to go Docker Compose project for Phoenix 1.4.


#10

Nice, thx for sharing this!