Last active
April 3, 2017 14:45
-
-
Save alicanerdogan/9e3236dbcf45b831afc321537eaa17b2 to your computer and use it in GitHub Desktop.
Dockerfile for Phoenix on Ubuntu 16.04
This file contains hidden or 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:16.04 | |
MAINTAINER Alican Erdogan <[email protected]> | |
RUN apt-get update && \ | |
apt-get install -y language-pack-en-base && \ | |
locale-gen "en_US.UTF-8" | |
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' | |
RUN apt-get install -y sudo wget git nano nginx postgresql postgresql-contrib | |
RUN wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && \ | |
dpkg -i erlang-solutions_1.0_all.deb && \ | |
apt-get update && \ | |
apt-get install -y esl-erlang && \ | |
apt-get install -y elixir | |
RUN mix archive.install https://github.com/phoenixframework/archives/raw/master/phoenix_new.ez --force | |
RUN service postgresql start && \ | |
sudo -u postgres psql -U postgres -d postgres -c "alter user postgres with password 'postgres';" && \ | |
service postgresql stop |
This file contains hidden or 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
docker run -d -it --name CONTAINER_NAME -v SOURCE_PATH:/root/apps -p 4000:4000 phoenix:latest bash /root/apps/start-dev.sh |
This file contains hidden or 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
cd /root/apps && | |
service postgresql start && | |
mix local.hex --force && | |
mix deps.get && | |
mix ecto.create && | |
mix ecto.migrate && | |
mix phoenix.server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment