Created
September 2, 2016 15:05
-
-
Save bitwalker/3f5fe253f81d9942a29f2bf26084acd5 to your computer and use it in GitHub Desktop.
Release container image
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 bitwalker/alpine-erlang:latest | |
MAINTAINER Paul Schoenfelder <[email protected]> | |
ENV REFRESHED_AT=2016-06-21 \ | |
HOME=/opt/app/ \ | |
MIX_ENV=prod \ | |
TERM=xterm \ | |
APP=myapp \ | |
APPVER=0.1.0 | |
EXPOSE 5000 | |
WORKDIR ${HOME} | |
COPY . . | |
RUN \ | |
echo "@edge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \ | |
apk add --no-cache --update --virtual .build-deps \ | |
elixir@edge \ | |
git && \ | |
mix local.hex --force && \ | |
mix local.rebar --force && \ | |
mix do compile, release --verbose --env=prod && \ | |
mkdir -p /opt/$APP/log && \ | |
cp rel/$APP/releases/$APPVER/$APP.tar.gz /opt/$APP/ && \ | |
cd /opt/$APP && \ | |
tar -xzf $APP.tar.gz && \ | |
rm $APP.tar.gz && \ | |
rm -rf $HOME/* && \ | |
apk del .build-deps && \ | |
chmod -R 777 $HOME && \ | |
chmod -R 777 /opt/$APP | |
WORKDIR /opt/$APP | |
CMD ./bin/$APP foreground |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment