mirror of
https://github.com/erlang/docker-erlang-example.git
synced 2025-04-19 01:24:03 +03:00
31 lines
615 B
Docker
31 lines
615 B
Docker
# Build stage 0
|
|
FROM erlang:24-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
|
|
|
|
CMD ["/dockerwatch/bin/dockerwatch", "foreground"]
|