# DOCKER-VERSION 1.9.1 FROM centos:7 MAINTAINER kballou@devnulllabs.io ENV LANG="en_US.UTF-8" ENV OTP_VER="${OTP_VER}" ENV REBAR_VERSION="${REBAR_VERSION}" ENV REBAR3_VERSION="${REBAR3_VERSION}" RUN set -xe \ && yum -y groups install "Development Tools" \ && yum -y install ncurses \ ncurses-devel \ unixODBC \ unixODBC-devel \ openssl-devel \ && OTP_SRC_URL="https://github.com/erlang/otp/archive/OTP-${OTP_VER}.tar.gz" \ && curl -fSL "$OTP_SRC_URL" -o otp-src.tar.gz \ && echo "${OTP_SRC_SUM} otp-src.tar.gz" | sha256sum -c - \ && mkdir -p /usr/src/otp-src \ && tar -zxf otp-src.tar.gz -C /usr/src/otp-src --strip-components=1 \ && rm otp-src.tar.gz \ && cd /usr/src/otp-src \ && ./otp_build autoconf \ && ./configure \ && make -j 4 \ && make install \ && find /usr/local -name examples | xargs rm -rf \ && cd /usr/src \ && rm -rf /usr/src/otp-src \ && REBAR_SRC_URL="https://github.com/rebar/rebar/archive/${REBAR_VERSION##*@}.tar.gz" \ && mkdir -p /usr/src/rebar-src \ && curl -fSL "$REBAR_SRC_URL" -o rebar-src.tar.gz \ && echo "${REBAR_SRC_SUM} rebar-src.tar.gz" | sha256sum -c - \ && tar -zxf rebar-src.tar.gz -C /usr/src/rebar-src --strip-components=1 \ && rm rebar-src.tar.gz \ && cd /usr/src/rebar-src \ && ./bootstrap \ && install -v ./rebar /usr/local/bin \ && cd /usr/src \ && rm -rf /usr/src/rebar-src \ && REBAR3_SRC_URL="https://github.com/erlang/rebar3/archive/${REBAR3_VERSION##*@}.tar.gz" \ && mkdir -p /usr/src/rebar3-src \ && curl -fSL "$REBAR3_SRC_URL" -o rebar3-src.tar.gz \ && echo "${REBAR3_SRC_SUM} rebar3-src.tar.gz" | sha256sum -c - \ && tar -zxf rebar3-src.tar.gz -C /usr/src/rebar3-src --strip-components=1 \ && rm rebar3-src.tar.gz \ && cd /usr/src/rebar3-src \ && HOME=$PWD ./bootstrap \ && install -v ./rebar3 /usr/local/bin \ && rm -rf /usr/src/rebar3-src CMD ["erl"]