kiwicopple/phoenix.1.3
Baseline image to use with Phoenix 1.3
75
In the root of your Phoenix application add the following Dockerfile:
FROM kiwicopple/phoenix.1.3
# Set /app as workdir
RUN mkdir /app
COPY . /app
WORKDIR /app
# Prepare for start
RUN mix deps.get --only prod
RUN MIX_ENV=prod mix compile
RUN cd assets && npm install && node node_modules/brunch/bin/brunch build && cd ..
EXPOSE 4000
# Start the server
CMD MIX_ENV=prod mix phx.server
Build and run
docker build -t YOUR_APP .
docker run YOUR_APP
docker pull kiwicopple/phoenix.1.3