1
0
mirror of https://github.com/erlang/docker-erlang-example.git synced 2025-07-29 11:41:10 +03:00
Files
2022-06-13 08:47:16 +02:00

32 lines
581 B
Docker

# Build stage 0
FROM erlang:alpine
# Set working directory
RUN mkdir /buildroot
WORKDIR /buildroot
# Copy our Erlang test application
COPY backend backend
# And build the release
WORKDIR backend
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/backend/_build/prod/rel/backend /backend
# Expose relevant ports
EXPOSE 8080
EXPOSE 8443
CMD ["/backend/bin/backend", "foreground"]