You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

36 lines
933 B

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 . .
# Compile the application
RUN mix local.hex --force && mix local.rebar --force
RUN mix deps.get --only prod
RUN MIX_ENV=prod mix compile
# Update the static Swagger documentation
RUN MIX_ENV=prod mix phx.swagger.generate
# 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"]