ARG ELIXIR_VERSION=1.17.3 ARG OTP_VERSION=27.3.4.7 ARG DEBIAN_VERSION=trixie-20260202-slim FROM "docker.io/hexpm/elixir:${ELIXIR_VERSION}-erlang-${OTP_VERSION}-debian-${DEBIAN_VERSION}" # Install dependencies RUN apt-get update \ && apt-get install -y --no-install-recommends build-essential make gcc erlang-dev git autoconf automake libtool pkg-config \ && rm -rf /var/lib/apt/lists/* # Create a build directory and copy in the project files WORKDIR /app COPY . . # Install Elixir application dependencies and run Ecto migrations RUN mix setup # Compile the application RUN MIX_ENV=prod mix compile # Update the static Swagger documentation RUN mix phx.swagger.generate # Compile application static assets RUN MIX_ENV=prod mix assets.deploy # Set the locale ENV LANG=en_US.UTF-8 ENV LANGUAGE=en_US:en ENV LC_ALL=en_US.UTF-8 # Run as the isidore-dev user USER 1008 # Set environment variables for the application ENV PORT=4000 ENV MIX_ENV="prod" CMD ["mix", "phx.server"]