45 lines
1.1 KiB
Docker
45 lines
1.1 KiB
Docker
|
FROM ubuntu:latest
|
||
|
|
||
|
WORKDIR /tmp
|
||
|
|
||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||
|
ENV TZ=Pacific/Auckland
|
||
|
|
||
|
RUN apt-get update && \
|
||
|
apt-get -y --no-install-recommends install wget curl ca-certificates gnupg git build-essential && \
|
||
|
wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb && \
|
||
|
dpkg -i erlang-solutions_2.0_all.deb && \
|
||
|
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
|
||
|
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
|
||
|
apt-get update && \
|
||
|
apt-get -y --no-install-recommends install elixir erlang-dev erlang-parsetools inotify-tools nodejs yarn && \
|
||
|
rm -rf /var/lib/apt/lists/*
|
||
|
|
||
|
ENV LANG C.UTF-8
|
||
|
|
||
|
RUN mix local.hex --force
|
||
|
RUN mix local.rebar --force
|
||
|
|
||
|
WORKDIR /app
|
||
|
|
||
|
COPY assets /app/assets
|
||
|
COPY config /app/config
|
||
|
COPY lib /app/lib
|
||
|
COPY priv /app/priv
|
||
|
COPY rel /app/rel
|
||
|
COPY test /app/test
|
||
|
COPY mix.exs /app
|
||
|
COPY mix.lock /app
|
||
|
|
||
|
RUN mix deps.get
|
||
|
RUN mix deps.compile
|
||
|
RUN mix compile
|
||
|
|
||
|
WORKDIR /app/assets
|
||
|
|
||
|
RUN yarn install --ignore-optional --non-interactive --frozen-lockfile
|
||
|
|
||
|
WORKDIR /app
|
||
|
|
||
|
CMD mix deps.get && mix phx.server
|