akalan

akalan

Docker image with Erlang, Elixir, and NodeJS on CentOS for cross-building Elixir/Phoenix apps as OTP releases.

Uses CentOS official base image and official binary
builds of Erlang, Elixir, and NodeJS.

Versions:

  • CentOS: 7.6 (x86-64) - same as RHEL 7.6
  • Erlang: 22.0.4
  • Elixir: 1.9.0
  • NodeJS: 10.16.0

Warning: Do not use this image to deploy the app as the size is quite large at ~598MB

Github | Docker Hub

For an example build file that cross-builds a Phoenix app, refer to phoenix/build-release.sh file.

This file should be placed at the root of the Elixir/Phoenix project and:

# Run the build script inside a container running this image
# Note: On Windows replace $(pwd) with the actual path

docker run -v $(pwd):/home --rm -it akalan/elixir-centos /home/build-release.sh


# Run the generated release inside the same container

docker run -v $(pwd):/home --rm -it akalan/elixir-centos /home/_build/prod/rel/appname/bin/appname

The release is tarred and zipped to releases/appname-version-utc_time_stamp.tar.gz

Showing Posts 1 to 1

chulkilee

chulkilee

Quick feedback

General Docker

  • Check the checksum of any downloaded files
  • Clean up cache - e.g. yum update will create caches, so remove all caches in the same RUN - probably it explains the size of the image
  • Leverage layers to maximize caching
    • e.g. changing Elixir version should not invalid layers for erlang

Erlang/Elixir

  • Seems like there is no official repo; then you can just easily build it with src from Releases · erlang/otp · GitHub
  • Precompiled elixir from github release is compiled for the oldest supported OTP, which means you may not leverage the new OTP features :slight_smile:
  • erlang 20.0.4 had a bad bug (ERL-986) - so use the latest version (at least 22.0.5) :slight_smile:

At work, we use Red Hat Universal Base Image - so I created dockerfile for Erlang and Elixir from ubi7 (Red Hat Universal Base Image 7) - check out Chulki Lee / docker-images · GitLab

— All posts loaded —

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 94592 917
New
cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
heathen
Quite interesting article Google brought me. Didn’t find any mentions about it here. What do you think in general? Would you use togethe...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
AstonJ
Since we have deprecated our Erlang sections (as we have dedicated Erlang Forums now) let’s add this thread for those who’d like to post ...
New
maennchen
:warning: Security advisory: Decimal DoS vulnerability A vulnerability has been published for decimal where very large exponents can cau...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews