diff --git a/Dockerfile b/Dockerfile index 98c0f5c..49f659a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ ARG DEBIAN_VERSION=bookworm-20250610-slim ARG BUILDER_IMAGE="hexpm/elixir:${ELIXIR_VERSION}-erlang-${OTP_VERSION}-debian-${DEBIAN_VERSION}" ARG RUNNER_IMAGE="debian:${DEBIAN_VERSION}" -FROM ${BUILDER_IMAGE} as builder +FROM ${BUILDER_IMAGE} AS builder # install build dependencies RUN apt-get update -y && apt-get install -y build-essential git \ @@ -53,12 +53,12 @@ COPY lib lib COPY assets assets -# compile assets -RUN mix assets.deploy - -# Compile the release +# Compile the project first (generates colocated hooks for esbuild) RUN mix compile +# compile assets (must happen after mix compile for colocated hooks) +RUN mix assets.deploy + # Changes to config/runtime.exs don't require recompiling the code COPY config/runtime.exs config/ @@ -76,9 +76,9 @@ RUN apt-get update -y && \ # Set the locale RUN sed -i '/en_US.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=en_US.UTF-8 +ENV LANGUAGE=en_US:en +ENV LC_ALL=en_US.UTF-8 WORKDIR "/app" RUN chown nobody /app