Skip to content

Instantly share code, notes, and snippets.

@webdeb
Last active September 21, 2017 06:42
Show Gist options
  • Save webdeb/668b67be2b5d232b1b0bbbc5b592c99d to your computer and use it in GitHub Desktop.
Save webdeb/668b67be2b5d232b1b0bbbc5b592c99d to your computer and use it in GitHub Desktop.
Dockerfile for releases
FROM alpine:3.5
ARG APP
EXPOSE 5000
EXPOSE 4369
ENV PORT=5000 \
MIX_ENV=prod
RUN apk --no-cache add ncurses openssl
COPY releases/$APP /opt/$APP
RUN mkdir -p /opt/$APP/log
RUN \
cd /opt/$APP && \
chmod -R 777 /opt/$APP && \
ln -s /opt/$APP/bin/$APP /opt/$APP/bin/app
ENV PATH /opt/$APP/bin:/opt/$APP/erts-8.3/bin:$PATH
WORKDIR /opt/$APP
COPY releases/run run
CMD ./run foreground
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment