I tried to create a dockerfile with the latest erlang, elixir and phoenix. With wxwidgets working, if that is possible at all. Would be nice to be able to offer this to others starting elixir and phoenix tutorials. Moreover I added nano, node, emacs and spacemacs (the last two not yet tested, I will have to add some config I think, suggestions welcome). It looks like elixir end phoenix are working after some simple tests. The dockerfile I copied below.
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# @trenpixster wrote this file. As long as you retain this notice you
# can do whatever you want with this stuff. If we meet some day, and you think
# this stuff is worth it, you can buy me a beer in return
# ----------------------------------------------------------------------------
# Use phusion/baseimage as base image. To make your builds reproducible, make
# sure you lock down to a specific version, not to `latest`!
# a list of version numbers.
#
# Usage Example : Run One-Off commands
# where <VERSION> is one of the baseimage-docker version numbers.
#
# docker run --rm -t -i phusion/baseimage:<VERSION> /sbin/my_init -- bash -l
#
# Thanks to @hqmq_ for the heads up
FROM phusion/baseimage:0.9.18
# Important! Update this no-op ENV variable when this Dockerfile
# is updated with the current date. It will force refresh of all
# of the base images and things like `apt-get update` won't be using
# old cached versions when the Dockerfile is built.
ENV REFRESHED_AT 05-04-2016
# Set correct environment variables.
# Setting ENV HOME does not seem to work currently. HOME is unset in Docker container.
#ENV HOME /root
# Workaround:
RUN echo /root > /etc/container_environment/HOME
# Regenerate SSH host keys. baseimage-docker does not contain any, so you
# have to do that yourself. You may also comment out this instruction; the
# init system will auto-generate one during boot.
RUN /etc/my_init.d/00_regen_ssh_host_keys.sh
# Baseimage-docker enables an SSH server by default, so that you can use SSH
# to administer your container. In case you do not want to enable SSH, here's
# how you can disable it. Uncomment the following:
#RUN rm -rf /etc/service/sshd /etc/my_init.d/00_regen_ssh_host_keys.sh
# Use baseimage-docker's init system.
CMD ["/sbin/my_init"]
# ...put your own build instructions here...
# Set the locale
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
WORKDIR /tmp
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
# Avoid ERROR: invoke-rc.d: policy-rc.d denied execution of start. Avoid warning: update-rc.d: warning: default stop runlevel arguments (0 1 6) do not match rsync Default-Stop values (none)
#RUN echo '#!/bin/sh\nexit 0' > /usr/sbin/policy-rc.d && \
# echo '#!/bin/sh' > /usr/sbin/policy-rc.d && \
# echo 'exit 101' >> /usr/sbin/policy-rc.d && \
# chmod +x /usr/sbin/policy-rc.d
# update and install some software requirements
RUN apt-get update && apt-get upgrade -y && apt-get install -y curl wget git unzip autoconf make g++ gcc fop libxml2-utils xsltproc
WORKDIR /
## Install emacs
RUN apt-get -y build-dep emacs24
RUN tar -xf emacs-24.5.tar.*
WORKDIR emacs-24.5
RUN ./configure
RUN make
RUN make install
WORKDIR /
RUN rm -R /emacs-24.5.tar.gz
RUN add-apt-repository ppa:openjdk-r/ppa
RUN apt-get update && apt-get install openjdk-8-jdk -y
WORKDIR /
#RUN emacs --daemon && emacsclient --eval "(kill-emacs)"
# install nano (and pico)
RUN apt-get update && apt-get install nano -y
# Needed for terminal handling (libc-dev libncurses5 libtinfo-dev libtinfo5 ncurses-bin)
RUN apt-get -y install libncurses5-dev openssl libssl-dev
# For building with wxWidgets
RUN apt-get -y install libwxbase2.8 libwxgtk2.8-dev libqt4-opengl-dev libgtk2.0-dev libgl1-mesa-dev libglu1-mesa-dev libpng3
# For building ssl (libssh-4 libssl-dev zlib1g-dev)
RUN apt-get -y install libssh-dev
# ODBC support (libltdl3-dev odbcinst1debian2 unixodbc)
RUN apt-get -y install unixodbc-dev
RUN apt-get -y install ncurses-dev
RUN tar -xvzf otp_src_18.3.tar.gz
RUN chmod -R 777 otp_src_18.3
WORKDIR otp_src_18.3
RUN ./configure
RUN make
RUN make install
RUN cd .. && rm -R otp_src_18.3/
RUN echo "ERLANG_HOME=/usr/local/lib/erlang" >> ~/.bashrc
RUN echo "export PATH=$PATH:$ERLANG_HOME/bin" >> ~/.bashrc
RUN echo "export DISPLAY=:100.0" >> ~/.bashrc
RUN apt-get purge --auto-remove openjdk-8-jdk -y
RUN rm -R /usr/lib/jvm
# Download and Install Specific Version of Elixir
WORKDIR /elixir
unzip Precompiled.zip && \
rm -f Precompiled.zip && \
ln -s /elixir/bin/elixirc /usr/local/bin/elixirc && \
ln -s /elixir/bin/elixir /usr/local/bin/elixir && \
ln -s /elixir/bin/mix /usr/local/bin/mix && \
ln -s /elixir/bin/iex /usr/local/bin/iex
# Install local Elixir hex and rebar
RUN /usr/local/bin/mix local.hex --force && \
/usr/local/bin/mix local.rebar --force
WORKDIR /
# install Node.js (>= 5.0.0) and NPM in order to satisfy
brunch.io dependencies