File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -43,31 +43,32 @@ cd elixir/1.9.2/alpine
4343Lower final image size by using multistage docker build and avvo/alpine image.
4444
4545``` Dockerfile
46- FROM avvo/elixir:1.9.2- alpine-otp22 AS build
46+ FROM avvo/elixir:1.9.4-otp22- alpine-3.9 AS build
4747
4848ENV MIX_ENV=prod
4949
5050COPY . .
5151
52- RUN mix do deps.get, deps.compile, compile
53-
5452# If you have assets to build
5553RUN cd assets \
5654 && npm install \
5755 && npm run deploy \
58- && cd ..
56+ && cd ../
5957
6058RUN mix phx.digest
6159
62- RUN mix release
60+ RUN mix do deps.get, compile, release
6361
6462FROM avvo/elixir-release:alpine-3.9
6563
6664EXPOSE 4000
6765
6866WORKDIR /srv/app_name
6967
70- COPY --from=build ./_build/prod/rel/app_name/ .
68+ COPY --from=build ./_build/prod/app_name-APP_VERSION.tar.gz .
69+
70+ RUN tar zxf app_name-APP_VERSION.tar.gz \
71+ && rm app_name-APP_VERSION.tar.gz
7172
7273ENTRYPOINT ["avvoenv" , "exec" ]
7374CMD ["bin/app_name" , "start" ]
You can’t perform that action at this time.
0 commit comments