Skip to content

Instantly share code, notes, and snippets.

@plamb
Created April 8, 2016 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save plamb/35fc69e6dd4a51aaf4676de04563db90 to your computer and use it in GitHub Desktop.
Save plamb/35fc69e6dd4a51aaf4676de04563db90 to your computer and use it in GitHub Desktop.
docker exrm (many months old, might be way outdated)
# docker-compose.yml
# You are going to get an warning about "Missing beam file elf_format...
# from this link and the stackoverflow one, it looks like it can be ignored
# https://github.com/bitwalker/exrm/issues/107
search_api:
build: .
environment:
MIX_ENV: prod
command: mix release
volumes:
- /some/path:/app
working_dir: /app
# This image is designed as a base image to use in creating exrm releases. It
# includes quite a few things that you would not need for just a pure runtime
# but is also suitable to use as a base for a phoenix app (you may need to add
# npm for handling the static assets)
FROM debian:jessie
MAINTAINER Someone <someone@somewhere.com>
ENV DEBIAN_FRONTEND noninteractive
# Get base packages and set the locale
RUN apt-get update && apt-get install -y -qq --no-install-recommends \
build-essential \
ca-certificates \
curl \
git \
locales \
openssl \
unzip \
wget && \
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen && \
locale-gen en_US.UTF-8 && \
/usr/sbin/update-locale LANG=en_US.UTF-8 && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN curl -o /tmp/erlang.deb http://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && \
dpkg -i /tmp/erlang.deb && \
rm -rf /tmp/erlang.deb && \
apt-get update && apt-get install -y -qq --no-install-recommends \
# erlang-base=1:18.1 erlang-dev=1:18.1 erlang-eunit=1:18.1 erlang-xmerl=1:18.1 \
erlang=1:18.1 \
elixir=1.1* && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install local Elixir hex and rebar
RUN /usr/local/bin/mix local.hex --force && \
/usr/local/bin/mix local.rebar --force && \
/usr/local/bin/mix hex.info
@plamb
Copy link
Author

plamb commented Apr 8, 2016

You should be able to use any current dockerfile that support elixir. I just put the one I used here for reference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment