From cb12a01dc98771aec22bb3652392909e0e7f4bd7 Mon Sep 17 00:00:00 2001 From: arndttouby Date: Tue, 16 Dec 2025 08:22:53 +0000 Subject: [PATCH] Update Dockerfile Signed-off-by: arndttouby --- Dockerfile | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4eb046d..cffef3c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,9 +11,9 @@ # - https://pkgs.org/ - resource for finding needed packages # - Ex: hexpm/elixir:1.18.1-erlang-27.2-debian-bookworm-20250113-slim # -ARG ELIXIR_VERSION=1.18.3 -ARG OTP_VERSION=27.3 -ARG DEBIAN_VERSION=bookworm-20250317-slim +ARG ELIXIR_VERSION=1.19.4 +ARG OTP_VERSION=28.3 +ARG DEBIAN_VERSION=trixie-20251208-slim ARG BUILDER_IMAGE="hexpm/elixir:${ELIXIR_VERSION}-erlang-${OTP_VERSION}-debian-${DEBIAN_VERSION}" ARG RUNNER_IMAGE="debian:${DEBIAN_VERSION}" @@ -21,18 +21,13 @@ ARG RUNNER_IMAGE="debian:${DEBIAN_VERSION}" FROM ${BUILDER_IMAGE} AS package_installer # install build dependencies -RUN apt-get update -y && apt-get install -y build-essential \ +RUN apt-get update && apt-get install -y --no-install-recommends build-essential \ git \ locales \ curl \ inotify-tools -RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - - -RUN apt-get update -y && apt-get install -y nodejs \ - && apt-get clean && rm -f /var/lib/apt/lists/*_* - -RUN npm install -g npm@latest +RUN apt-get clean && rm -f /var/lib/apt/lists/*_* # prepare build dir WORKDIR /app @@ -67,6 +62,8 @@ RUN mkdir config COPY config/config.exs config/${MIX_ENV}.exs config/ RUN mix deps.compile +RUN mix assets.setup + COPY priv priv COPY lib lib @@ -87,18 +84,18 @@ RUN mix release #################################################################################################### # start a new build stage so that the final image will only contain # the compiled release and other runtime necessities -FROM ${RUNNER_IMAGE} +FROM ${RUNNER_IMAGE} as final -RUN apt-get update -y && \ - apt-get install -y libstdc++6 openssl libncurses5 locales ca-certificates \ - && apt-get clean && rm -f /var/lib/apt/lists/*_* +RUN apt-get update \ + && apt-get install -y --no-install-recommends libstdc++6 openssl libncurses6 locales ca-certificates \ + && rm -rf /var/lib/apt/lists/* # Set the locale -RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen +RUN sed -i '/de_DE.UTF-8/s/^# //g' /etc/locale.gen && locale-gen -ENV LANG=en_US.UTF-8 -ENV LANGUAGE=en_US:en -ENV LC_ALL=en_US.UTF-8 +ENV LANG=de_DE.UTF-8 +ENV LANGUAGE=de_DE:de +ENV LC_ALL=de_DE.UTF-8 WORKDIR "/app" RUN chown nobody /app @@ -107,7 +104,7 @@ RUN chown nobody /app ENV MIX_ENV="prod" # Only copy the final release from the build stage -COPY --from=builder --chown=nobody:root /app/_build/${MIX_ENV}/rel/phx_db ./ +COPY --from=builder --chown=nobody:root /app/_build/${MIX_ENV}/rel/bmt_checkout ./ # Copy the tailwind-cli binary used to compile stylesheets for pages RUN mkdir -p ./bin/_build