Skip to content
This repository was archived by the owner on Jun 13, 2019. It is now read-only.

Commit afcce2f

Browse files
authored
Update README.md
1 parent 88aa10f commit afcce2f

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

Diff for: README.md

+55
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,60 @@
11
# mix docker
22

3+
## 🚨🚨 This project is now obsolete and abandoned! 🚨🚨
4+
5+
With docker multi-stage builds you can simply use:
6+
```dockerfile
7+
# Dockerfile
8+
FROM elixir:1.6.5-alpine as build
9+
10+
# install build dependencies
11+
RUN apk add --update git
12+
13+
# prepare build dir
14+
RUN mkdir /app
15+
WORKDIR /app
16+
17+
# install hex + rebar
18+
RUN mix local.hex --force && \
19+
mix local.rebar --force
20+
21+
# set build ENV
22+
ENV MIX_ENV=prod
23+
24+
# install mix dependencies
25+
COPY mix.exs mix.lock ./
26+
COPY config ./
27+
COPY deps ./
28+
RUN mix deps.compile
29+
30+
# build release
31+
COPY . .
32+
RUN mix release --no-tar --verbose
33+
34+
# prepare release image
35+
FROM alpine:3.6
36+
RUN apk add --update bash openssl
37+
38+
RUN mkdir /app && chown -R nobody: /app
39+
WORKDIR /app
40+
USER nobody
41+
42+
COPY --from=build /app/_build/prod/rel/myapp ./
43+
44+
ENV REPLACE_OS_VARS=true
45+
ENV HTTP_PORT=4000 BEAM_PORT=14000 ERL_EPMD_PORT=24000
46+
EXPOSE $HTTP_PORT $BEAM_PORT $ERL_EPMD_PORT
47+
48+
ENTRYPOINT ["/app/bin/myapp"]
49+
```
50+
51+
and standard `docker build`.
52+
53+
54+
55+
56+
## OLD README CONTENT
57+
358
[![Build Status](https://travis-ci.org/Recruitee/mix_docker.svg?branch=master)](https://travis-ci.org/Recruitee/mix_docker)
459

560
Put your Elixir app inside minimal Docker image.

0 commit comments

Comments
 (0)