1
0
mirror of https://github.com/erlang/docker-erlang-example.git synced 2025-07-29 11:41:10 +03:00
Files
2019-10-02 18:08:45 +02:00

37 lines
747 B
Docker

# Build stage 0
FROM erlang:alpine
# Install some libs
RUN apk add --no-cache g++ && \
apk add --no-cache make
# Reset working directory
RUN mkdir /buildroot
WORKDIR /buildroot
# Copy our Erlang test application
COPY dockerwatch dockerwatch
# And build the release
WORKDIR dockerwatch
RUN rebar3 as prod release
# Build stage 1
FROM alpine
# Install some libs
RUN apk add --no-cache openssl && \
apk add --no-cache ncurses-libs && \
apk add --no-cache libstdc++
# Install the released application
COPY --from=0 /buildroot/dockerwatch/_build/prod/rel/dockerwatch /dockerwatch
# Expose relevant ports
EXPOSE 8080
EXPOSE 8443
# Use sh in order for child reaping to work
CMD ["sh","-c","/dockerwatch/bin/dockerwatch foreground"]