Skip to content

Commit 958e17c

Browse files
committed
Change to debian
1 parent af8d84d commit 958e17c

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

Dockerfile

+13-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
ARG ELIXIR_VERSION=1.17.3
22
ARG ERLANG_VERSION=27.2
3-
ARG ALPINE_VERSION=3.20.3
3+
ARG DEBIAN_VERSION=bookworm-20241202-slim
44

5-
FROM hexpm/elixir:${ELIXIR_VERSION}-erlang-${ERLANG_VERSION}-alpine-${ALPINE_VERSION} AS build
5+
FROM hexpm/elixir:${ELIXIR_VERSION}-erlang-${ERLANG_VERSION}-debian-${DEBIAN_VERSION} AS build
66

77
# install build dependencies
8-
RUN apk add --no-cache --update git build-base nodejs yarn
8+
RUN apt update && \
9+
apt upgrade -y && \
10+
apt install -y --no-install-recommends git build-essential nodejs yarnpkg && \
11+
apt clean -y && rm -rf /var/lib/apt/lists/*
912

1013
# prepare build dir
1114
RUN mkdir /app
@@ -26,7 +29,7 @@ RUN mix deps.compile
2629

2730
# build assets
2831
COPY assets assets
29-
RUN cd assets && yarn install && yarn run webpack --mode production
32+
RUN cd assets && yarnpkg install && yarnpkg run webpack --mode production
3033
RUN mix phx.digest
3134

3235
# build project
@@ -39,8 +42,12 @@ COPY rel rel
3942
RUN mix do sentry.package_source_code, release
4043

4144
# prepare release image
42-
FROM alpine:${ALPINE_VERSION} AS app
43-
RUN apk add --no-cache --update bash openssl git libstdc++
45+
FROM debian:${DEBIAN_VERSION} AS app
46+
47+
RUN apt update && \
48+
apt upgrade -y && \
49+
apt install --no-install-recommends -y bash openssl git && \
50+
apt clean -y && rm -rf /var/lib/apt/lists/*
4451

4552
RUN mkdir /app
4653
WORKDIR /app

0 commit comments

Comments
 (0)