Skip to content

Commit

Permalink
Fix Dockerfile on elixir 1.11.2
Browse files Browse the repository at this point in the history
This is a teporary measure aimed at fixing #35
It also adds a CMD as suggested in #22
  • Loading branch information
wmnnd committed Mar 9, 2021
1 parent 9575c00 commit dc04c9f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ops/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
FROM elixir:1.11-alpine as build
# FIXME: Loosen Elixir Docker image requirement once
# https://github.com/gen-smtp/gen_smtp/issues/250
# and https://github.com/erlang/otp/issues/4585 have been fixed
FROM elixir:1.11.2-alpine as build
ENV MIX_ENV=prod

RUN apk add git npm build-base
Expand All @@ -18,11 +21,12 @@ RUN npm run deploy --prefix ./assets && \
mix phx.digest && \
mix release

FROM elixir:1.11-alpine
FROM elixir:1.11.2-alpine
ENV HOME=/opt/app
WORKDIR ${HOME}
COPY --from=build _build/prod/rel/keila ${HOME}
RUN mkdir -p ${HOME} && \
adduser -s /bin/sh -u 1001 -G root -h ${HOME} -S -D default && \
chown -R 1001:0 ${HOME}
ENTRYPOINT ["/opt/app/bin/keila"]
CMD "start"

0 comments on commit dc04c9f

Please sign in to comment.