qhwa

qhwa

Dockerize, a small package to help generating Docker images for your Elixir projects

Dockerize - A small hex package for creating Docker images from an Elixir project.

Hi, guys,

I’ve been playing with Elixir and Docker together for some time and today I’d like to share some of my experiences on running Elixir on Docker to the community. This includes:

  • Dockerize - the hex package that helps scaffolding
  • Two Docker base images: elixir-builder & elixir-runner, used by this package by default.

Also, I wrote a blog post on how to do it manually if you want to build your own stacks.

This is a tiny library and many others may have better solutions, but I think it will provide most of the developers a good start on deployment.

So, please check it if you’re going to de deployments, and don’t hesitate to drop any comment or advice. It will help me improving it definitely.

Thanks!

Most Liked

qhwa

qhwa

Yes! Alpine is surely amazing. I am a fan of it too but I found that I have to deal with the differences between musl and standard libc. If the library owner uses NIF and doesn’t provide prebuilt binaries, we have to compile it ourselves. Compiling on Alphine today is a bit harder than Debian because musl is not the majority. I’m sure it will get better as Alpine becomes more and more popular.

I picked Alpine because it is super small. But today thanks to Docker layer caching and cloud building, we don’t need to build locally and push to remote, sizing is not a big problem now. making the library smoother to adapt seems more important to me.

qhwa

qhwa

v1.0.0 released!

  • use explicit base Docker images from scratch so developers can have full control
  • use Debian instead of Alpine as the system image by default (to trade-off for better maintainability)
  • documentation improvements

Welcome to give it a try!

qhwa

qhwa

Today I released version v1.1.0.

updates:

  • support building assets with esbuild in Phoenix 1.6
  • some improvements on the usage of ARG and ENV instructures.
qhwa

qhwa

v0.2.0 updates

  • faster building speed, normally arround 3min with fresh (depending on your project) and seconds with cache
  • smaller size of the final built image, ~30MB
  • better support for Phoenix projects. Now it automatically detect if you are in a Phoenix project.
dimitarvp

dimitarvp

Can you clarify on that? I am not a heavy Docker user but I do use it and so far I’ve had no problems with Alpine.

Where Next?

Popular in Libraries Top

josevalim
Hi everyone, We would like to announce that Plataformatec is working on a new MySQL driver called MyXQL. Our goal is to eventually integ...
New
tompave
Hello there, I would like to share a feature toggles library (AKA feature flags) I’ve been working on. The main package is FunWithFlags...
New
markmark206
simple_feature_flags is a tiny package that lets you turn features on or off based on which environment (e.g. localhost, staging, product...
New
woutdp
Hi! I wanted to introduce my latest project LiveSvelte. It allows you to render Svelte inside LiveView with end-to-end reactivity. It’s ...
New
mindok
What is ContEx? A pure Elixir server-side data plotting/charting library outputting SVG. It has nice barcharts in particular and works g...
New
michalmuskala
Another small library today. PersistentEts Hex: persistent_ets | Hex GitHub: GitHub - michalmuskala/persistent_ets Ets table backed by...
New
aditya7iyengar
Rummage.Ecto and Rummage.Phoenix provide ways to perform Searching, Sorting and Pagination over Ecto queries and Phoenix collections. Fo...
New
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
ostinelli
Let’s write a database! Well not really, but I think it’s a little sad that there doesn’t seem to be a simple in-memory distributed KV da...
New
versilov
Could not wait for the missing Elixir ML libraries to appear, so, I wrote one myself, taking https://github.com/sdwolfz/exlearn as a foun...
New

Other popular topics Top

chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30048 115
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
AstonJ
You’re a programmer, so you don’t need spoon feeding with the conventional drivel about “this is an integer.” No. You need to know what’s...
New
ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
myronmarston
The Elixir Typespec docs show the following syntax for keyword lists in typespecs: # ... | [key: type] # keyword lis...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
lucidguppy
I have a super simple question about elixir - how would I take a file like this foo bar baz and output a new file that enumerates th...
New

Sub Categories:

We're in Beta

About us Mission Statement