diff --git a/Dockerfile b/Dockerfile index 19c4575..e2ddb78 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,9 +14,16 @@ RUN mix local.hex --force && \ # set build ENV ENV MIX_ENV="prod" +# Set this magic ERL_FLAGS value to allow cross-compilation from Apple Silicon. +# This (apparently) fixes a known QEMU issue. See: +# * https://elixirforum.com/t/elixir-docker-image-wont-build-for-linux-arm64-v8-using-github-actions/56383/12 +# * https://elixirforum.com/t/unable-to-compile-default-elixir-project-from-the-getting-started-guide/57199/12 +ENV ERL_FLAGS="+JPperf true" + # install mix dependencies COPY mix.exs mix.lock ./ RUN mix deps.get --only $MIX_ENV + RUN mkdir config # copy compile-time config files before we compile dependencies @@ -30,10 +37,12 @@ COPY lib lib # Compile the release RUN mix compile + # Generate ssl certificate RUN openssl req -new -newkey rsa:4096 -days 365 -nodes -sha256 -x509 -subj "/C=US/ST=CA/L=ocsf/O=ocsf.io/CN=ocsf-schema" -keyout priv/cert/selfsigned_key.pem -out priv/cert/selfsigned.pem + # Changes to config/runtime.exs don't require recompiling the code -COPY config/releases.exs config/runtime.exs +COPY config/releases.exs config/runtime.exs COPY rel rel RUN mix release @@ -42,9 +51,6 @@ RUN mix release # the compiled release and other runtime necessities FROM ${elixir_image} -# 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 diff --git a/mix.exs b/mix.exs index b1fa830..a67ca18 100644 --- a/mix.exs +++ b/mix.exs @@ -10,7 +10,7 @@ defmodule Schema.MixProject do use Mix.Project - @version "2.77.2" + @version "2.77.3" def project do build = System.get_env("GITHUB_RUN_NUMBER") || "SNAPSHOT"