Skip to content

Commit

Permalink
Docker: switch from Alpine to Debian Slim
Browse files Browse the repository at this point in the history
  • Loading branch information
meequrox committed May 10, 2024
1 parent 73bb90d commit 88ca21b
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Stage 1: build
FROM elixir:1.16.2-otp-26-alpine AS builder
FROM elixir:otp-26-slim AS builder

ENV MIX_ENV=prod

WORKDIR /build/double_gis_monitor

RUN apk update \
&& apk add --no-cache git
RUN apt-get update \
&& apt-get install -y git

COPY mix.exs mix.lock ./
COPY config config
Expand All @@ -23,14 +23,13 @@ RUN mix compile \
&& mix release --path /double_gis_monitor

# Stage 2: release
FROM alpine:latest AS runner

RUN apk update \
&& apk add --no-cache libstdc++ libgcc ncurses-libs
FROM debian:testing-slim AS runner

COPY --from=builder /double_gis_monitor /double_gis_monitor

EXPOSE 5432
EXPOSE 4369

ENV ERL_MAX_PORTS=32768

ENTRYPOINT ["/double_gis_monitor/bin/double_gis_monitor"]
CMD ["start"]

0 comments on commit 88ca21b

Please sign in to comment.