Skip to content

Commit

Permalink
Switch docker base image to 'phusion/baseimage'
Browse files Browse the repository at this point in the history
  • Loading branch information
rslota committed Apr 12, 2017
1 parent d6e398b commit 41d8f41
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 17 deletions.
25 changes: 17 additions & 8 deletions Dockerfile.build
@@ -1,15 +1,24 @@
FROM bitwalker/alpine-erlang:19.2.1b
FROM phusion/baseimage

ENV HOME=/opt/app/ TERM=xterm
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
ENV LC_ALL en_US.UTF-8

# Install Elixir and basic build dependencies
RUN \
echo "@edge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \
apk update && \
apk --no-cache --update add \
git make g++ \
elixir@edge && \
rm -rf /var/cache/apk/*
RUN apt-get update && apt-get install -y \
git \
wget \
gcc \
g++ \
make \
wget && \
wget http://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 elixir && \
apt-get clean


# Install Hex+Rebar
RUN mix local.hex --force && \
Expand Down
26 changes: 17 additions & 9 deletions Dockerfile.release
@@ -1,23 +1,31 @@
FROM bitwalker/alpine-erlang:19.2.1b
FROM phusion/baseimage

RUN apk update && \
apk --no-cache --update add libgcc libstdc++ && \
rm -rf /var/cache/apk/*
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
ENV LC_ALL en_US.UTF-8

# required packages
RUN apt-get update && apt-get upgrade -y && apt-get install -y \
bash \
bash-completion \
curl \
dnsutils \
vim && \
apt-get clean

EXPOSE 8443
ENV PUSH_HTTPS_BIND_ADDR=0.0.0.0 PUSH_HTTPS_PORT=8443 MIX_ENV=prod \
REPLACE_OS_VARS=true SHELL=/bin/sh
REPLACE_OS_VARS=true SHELL=/bin/bash

WORKDIR /opt/app

ADD mongoose_push.tar.gz ./
RUN chown -R default ./releases

# Move priv dir
RUN mv $(find lib -name mongoose_push-*)/priv .
RUN ln -s $(pwd)/priv $(find lib -name mongoose_push-*)/priv

USER default

VOLUME /opt/app/priv

CMD ["foreground"]
CMD ["console"]
ENTRYPOINT ["/opt/app/bin/mongoose_push"]

0 comments on commit 41d8f41

Please sign in to comment.