Hacker News new | ask | show | jobs
by onezerozeroone 2472 days ago
Wouldn't the point of running in Docker still be to guarantee version, environment, and config compatibility? Just because you run an Elixir app on your local machine doesn't mean it will work worry-free on Prod. Without Docker, you might have a different version of BEAM installed (or none at all), etc.
2 comments

Isn't that the purpose of tools like https://erlang.mk/guide/getting_started.html#_getting_starte... ?

Edit: and for cross-system dev (e.g. debian to windows) -> https://erlang.mk/guide/cross_compiling.html

I think OTP Releases would still depend on the target host being configured correctly and having all dependencies installed that your application needs to run.

Containers are all about consistency of the environment. For example, maybe your Elixir app wants to log out to something like Splunk or DataDog...if those agents aren't installed on the host, it doesn't matter what facilities BEAM provides. Or maybe your app depends on certain configs, libraries, or files being available at specific paths on the system. Things like that would be captured in the image your containers are running and guarantee consistency across machines and environments.

My bad, I sould have specified, I was only addressing "Without Docker, you might have a different version of BEAM installed (or none at all)"
Ah, makes sense!
Right, they do, that is why containers are still useful to releases for deployment.
you still need to compile your system on the same combination of OS/libc

libc builds don't work on Alpine

Correct, but you still need to compile the release on a similar system.

For example if your dev machine is Debian it won't work if the deploy machine is Alpine (similarly Windows builds won't work on Linux or Mac).

This is a question that I see hotly debated a lot in Elixir circles. BEAM and the Elixir toolset do have a lot of tools that overlap with Docker, so there's a lot of people that advocate for "not bothering" with Docker, while there's other people that are familiar with Docker (and perhaps not as familiar with BEAM) that will tend to use Docker. They both have more or less the same capability to deliver the same functionality.

IMO, in most use cases it makes sense to just use whichever you're more familiar with and will be more productive with. After all, that is the entire point of said tools...

BEAM tools are kubernetes done right for a single environment.

I say done right because kubernetes doesn't allow hot code reload without restarts.

They really do not overlap at all. I don't understand why the comparison with docker and Kubernetes continues.

Running BEAM on docker in kubernetes is great, a lot is added and operations smoothed by doing so.

Elixir Releases/Distillery definitely do overlap with Docker deployment techniques. The BEAM also has scaling capabilities that are tantamount to K8s horizontal scaling.
Deployment doesn't overlap. Erlang releases bundle up your code but you still need libraries like openssl, to have a nice bundle that can actually just run anywhere Docker is the way to go.

And horizontal scaling between the two do not overlap either, not sure what you mean. Packing containers (processes) efficiently into a cluster of nodes is not something Erlang does.

Edit: Erlang/OTP does offer fail over for what it calls "distributed applications" but based on a static set of nodes -- not horizontal scaling, anymore than other languages/frameworks do by letting you spawn new instances...

>Deployment doesn't overlap. Erlang releases bundle up your code but you still need libraries like openssl, to have a nice bundle that can actually just run anywhere Docker is the way to go.

And with Docker you still need libraries like, y'know Docker for your code to run.

>Packing containers (processes) efficiently into a cluster of nodes is not something Erlang does.

How much have you used BEAM? It definitely does do that. Scalability is one of Erlang/Elixir's primary benefits, and node clustering is exactly how it does that.

> How much have you used BEAM?

Over a decade professionally.

The closest thing Erlang has to it is pool http://erlang.org/doc/man/pool.html