-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (25 loc) · 799 Bytes
/
Dockerfile
File metadata and controls
32 lines (25 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# ================
# Build Stage
# ================
FROM qixxit/elixir-centos as build
MAINTAINER Ettore Berardi <ettore.berardi@bbc.co.uk>
ENV MIX_ENV=prod
ENV PORT=8080
COPY . .
RUN export MIX_ENV=prod && \
rm -Rf _build && \
mix deps.get && \
mix release
RUN APP_NAME="origin_simulator" && \
RELEASE_DIR=`ls -d _build/prod/rel/$APP_NAME/releases/*/` && \
mkdir /export && \
cp "$RELEASE_DIR/$APP_NAME.tar.gz" /export
# ================
# Deployment Stage
#
# For now just copying origin_simulator.tar.gz to the mounted host directory
# docker run --mount=source=/my/abs/path/to/build,target=/build,type=bind -it origin_simulator
# ================
FROM qixxit/elixir-centos
COPY --from=build /export /export
CMD ["cp", "/export/origin_simulator.tar.gz", "/build" ]