Elixirビルド用Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:trusty | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN apt-get update -q | |
RUN apt-get -y install language-pack-ja openssl libssl-dev ncurses-dev curl git | |
RUN update-locale LANG=ja_JP.UTF-8 | |
# SSH | |
RUN mkdir -p /root/.ssh | |
RUN echo "Host github.com\n\tStrictHostKeyChecking no\n" >> /root/.ssh/config | |
ADD github.pem /root/.ssh/id_rsa | |
RUN chmod 700 /root/.ssh/id_rsa | |
# Node.js | |
RUN apt-get -y install rlwrap && \ | |
curl -o /tmp/nodejs.deb https://deb.nodesource.com/node_5.x/pool/main/n/nodejs/nodejs_5.5.0-1nodesource1~trusty1_amd64.deb && \ | |
dpkg -i /tmp/nodejs.deb && \ | |
rm -rf /tmp/nodejs.deb | |
ENV LANG ja_JP.UTF-8 | |
ENV LANGUAGE ja_JP:ja | |
ENV LC_ALL ja_JP.UTF-8 | |
# Erlang and Elixir | |
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 -q && \ | |
apt-get install -y erlang-base=1:18.2 erlang-dev=1:18.2 erlang-eunit=1:18.2 erlang-parsetools=1:18.2 erlang-xmerl=1:18.2 elixir=1.2.0-1 && \ | |
apt-get clean -y && \ | |
rm -rf /var/cache/apt/* | |
RUN mix local.hex --force && mix local.rebar --force | |
# PostgreSQL | |
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8 | |
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" > /etc/apt/sources.list.d/pgdg.list | |
RUN apt-get update && apt-get -y -q install python-software-properties software-properties-common \ | |
&& apt-get -y -q install postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3 | |
# Alter postgres user for test | |
USER postgres | |
RUN /etc/init.d/postgresql start \ | |
&& psql --command "ALTER USER postgres WITH SUPERUSER PASSWORD 'postgres';" | |
USER root |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment