From c0a770ab8612f67ee7fb3fc503ff1afe2fa44b9c Mon Sep 17 00:00:00 2001 From: Andy Li <1450947+andy1li@users.noreply.github.com> Date: Tue, 16 Dec 2025 13:27:35 +0900 Subject: [PATCH] CC-2081: Update Elixir to 1.19 --- compiled_starters/elixir/codecrafters.yml | 4 +-- dockerfiles/elixir-1.19.Dockerfile | 25 +++++++++++++++++++ solutions/elixir/01-at4/code/codecrafters.yml | 4 +-- 3 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 dockerfiles/elixir-1.19.Dockerfile diff --git a/compiled_starters/elixir/codecrafters.yml b/compiled_starters/elixir/codecrafters.yml index ad810ea..4ecc9f5 100644 --- a/compiled_starters/elixir/codecrafters.yml +++ b/compiled_starters/elixir/codecrafters.yml @@ -7,5 +7,5 @@ debug: false # Use this to change the Elixir version used to run your code # on Codecrafters. # -# Available versions: elixir-1.18 -buildpack: elixir-1.18 +# Available versions: elixir-1.19 +buildpack: elixir-1.19 diff --git a/dockerfiles/elixir-1.19.Dockerfile b/dockerfiles/elixir-1.19.Dockerfile new file mode 100644 index 0000000..4639daa --- /dev/null +++ b/dockerfiles/elixir-1.19.Dockerfile @@ -0,0 +1,25 @@ +# syntax=docker/dockerfile:1.7-labs +FROM elixir:1.19.4-alpine + +# Ensures the container is re-built if dependency files change +ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="mix.exs" + +WORKDIR /app + +# .git & README.md are unique per-repository. We ignore them on first copy to prevent cache misses +COPY --exclude=.git --exclude=README.md . /app + +# install hex + rebar +RUN mix local.hex --force && \ + mix local.rebar --force + +# install and compile mix dependencies +RUN mix deps.get && \ + mix deps.compile + +# Install & cache deps +RUN .codecrafters/compile.sh + +RUN mkdir -p /app-cached +RUN if [ -d "/app/_build" ]; then mv /app/_build /app-cached; fi +RUN if [ -d "/app/deps" ]; then mv /app/deps /app-cached; fi diff --git a/solutions/elixir/01-at4/code/codecrafters.yml b/solutions/elixir/01-at4/code/codecrafters.yml index ad810ea..4ecc9f5 100644 --- a/solutions/elixir/01-at4/code/codecrafters.yml +++ b/solutions/elixir/01-at4/code/codecrafters.yml @@ -7,5 +7,5 @@ debug: false # Use this to change the Elixir version used to run your code # on Codecrafters. # -# Available versions: elixir-1.18 -buildpack: elixir-1.18 +# Available versions: elixir-1.19 +buildpack: elixir-1.19