File tree 1 file changed +13
-6
lines changed
1 file changed +13
-6
lines changed Original file line number Diff line number Diff line change 1
1
ARG ELIXIR_VERSION=1.17.3
2
2
ARG ERLANG_VERSION=27.2
3
- ARG ALPINE_VERSION=3.20.3
3
+ ARG DEBIAN_VERSION=bookworm-20241202-slim
4
4
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
6
6
7
7
# 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/*
9
12
10
13
# prepare build dir
11
14
RUN mkdir /app
@@ -26,7 +29,7 @@ RUN mix deps.compile
26
29
27
30
# build assets
28
31
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
30
33
RUN mix phx.digest
31
34
32
35
# build project
@@ -39,8 +42,12 @@ COPY rel rel
39
42
RUN mix do sentry.package_source_code, release
40
43
41
44
# 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/*
44
51
45
52
RUN mkdir /app
46
53
WORKDIR /app
You can’t perform that action at this time.
0 commit comments