Skip to content

Commit c9519de

Browse files
committed
Dockerfile to execute the script via Docker
1 parent d06efa5 commit c9519de

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Dockerfile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1-
FROM elixir:alpine
1+
FROM elixir:alpine as base
22

3-
ENTRYPOINT [ "elixir", "action.exs" ]
3+
FROM base as build
4+
WORKDIR /app
5+
COPY mix.exs .
6+
RUN mix deps.get
7+
COPY lib lib
8+
RUN mix deps.compile && mix escript.build
9+
10+
FROM base as release
11+
COPY --from=build /app/elixir_script /usr/local/bin
12+
13+
ENTRYPOINT [ "elixir_script" ]

0 commit comments

Comments
 (0)