1
0
mirror of https://github.com/erlang/docker-erlang-example.git synced 2025-08-08 17:42:05 +03:00
Files
2022-06-13 08:47:16 +02:00

33 lines
664 B
Docker

# Build stage 0
FROM erlang:alpine
# Set 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"]