Phoenix Framework dockerfile
github.com
github.com
1) Docker is a popular project for running applications in containers. This is a familiar deployment pattern for many devs(ops) people, so it's yet another option someone has.
2) Most people using Phoenix are probably not using bare-metal, which is the only real scenario I can think of that lets you easily say "we don't need anything except for Erlang's hot code reloading".
All cloud-y offerings will be potentially transient, hell, so will bare-metal. Most people will have infrastructure/tooling to provision new capacity easily, and to handle capacity being lost to failure. They almost certainly have, already, patterns for replacing containers in and out of their load balancers, etc, to avoid the need for hot code reload. I think Erlang's system for doing it can be great, but if you already have a system to run a single command that replaces your app/web/whatever fleet with a new code version, then you're not inherently ignoring the benefits/features of Erlang/Elixir, you're just doing something else you're already comfortable with.
Erlang has its own "docker", but Erlang runs on an OS, not the bare-metal host, so you still have to deal with getting it there and running it.
You can easily run it in a vanilla ubuntu image on k8s or mesos. No problem whatsoever running it directly on mesos without Docker overhead.
I haven't looked at the final image size, but I suspect that starting with ubuntu:latest means that you'll have a pretty large resulting image with a bunch of unnecessary software installed. For your next attempt, you might want to look into creating a more slim image that contains only the required dependencies.
I guess an alternate version of this would be one which has the core Phoenix dependencies but none of the asset management / Node.js stuff. I have a Phoenix API w/ no assets that could use such an image :)
A good rule of thumb is to combine if the command can touch the files of a previous command. Then it becomes easy to clean up after downloading a package (no need to have the downloaded version and the installed).
Also, I would try to build this using Alpine or another smaller Linux distro.
I found out that the `update-ca-certificates` step is required if you have GitHub dependencies.
Hope this is not a signal of the future of HackerNews.
Most of my problem was with Node.js and not with Erlang or Elixir.
There's some not-built-in apt repos to fix it
Just remember to set a default, e.g. if you're mostly using Node for Phoenix: `nvm alias default 5`.
It also sets up your global modules directory so that you don't need sudo to install global modules like gulp-cli (should you need any, though it's quite rare that you do nowadays).
I hope attitudes like this isn't a signal of the future of Hacker News.