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