appsignal-elixir
appsignal-elixir copied to clipboard
Failed to download binary package when compile in docker.
--
Describe the bug
we have a dockerized project. in the Dockerfile
COPY apps/graphql_web/mix.exs apps/graphql_web/
COPY apps/leangoo/mix.exs apps/leangoo/
COPY apps/leangoo_db/mix.exs apps/leangoo_db/
COPY apps/leangoo_file_service/mix.exs apps/leangoo_file_service/
COPY apps/leangoo_file_service_web/mix.exs apps/leangoo_file_service_web/
COPY apps/leangoo_pubsub_web/mix.exs apps/leangoo_pubsub_web/
COPY apps/leangoo_rabbit/mix.exs apps/leangoo_rabbit/
COPY apps/leangoo_reminder/mix.exs apps/leangoo_reminder/
COPY apps/leangoo_reminder_web/mix.exs apps/leangoo_reminder_web/
COPY apps/leangoo_web/mix.exs apps/leangoo_web/
COPY apps/logger_file_backend/mix.exs apps/logger_file_backend/
COPY apps/oauth_gateway/mix.exs apps/oauth_gateway/
COPY apps/oauth_gateway_web/mix.exs apps/oauth_gateway_web/
COPY config config
RUN no_proxy=192.168.0.100 mix deps.get \
&& mix deps.compile \
&& mix esbuild.install --if-missing
when docker build, it always failed with on mix deps.compile
==> appsignal
Downloading agent release
could not compile dependency :appsignal, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile appsignal --force", update it with "mix deps.update appsignal" or clean it with "mix deps.clean appsignal"
** (CaseClauseError) no case clause matching: []
(hackney 1.20.1) /app/deps/hackney/src/hackney_url.erl:248: :hackney_url.parse_netloc/2
(hackney 1.20.1) /app/deps/hackney/src/hackney.erl:691: :hackney.proxy_from_url/5
(hackney 1.20.1) /app/deps/hackney/src/hackney.erl:335: :hackney.request/5
mix_helpers.exs:229: Mix.Appsignal.Helper.do_download_file!/2
mix_helpers.exs:199: anonymous fn/5 in Mix.Appsignal.Helper.do_download_file!/3
(elixir 1.15.7) lib/enum.ex:4830: Enumerable.List.reduce/3
(elixir 1.15.7) lib/enum.ex:2564: Enum.reduce_while/3
mix_helpers.exs:166: Mix.Appsignal.Helper.download_package/2
But if I comment out the mix task
COPY apps/graphql_web/mix.exs apps/graphql_web/
COPY apps/leangoo/mix.exs apps/leangoo/
COPY apps/leangoo_db/mix.exs apps/leangoo_db/
COPY apps/leangoo_file_service/mix.exs apps/leangoo_file_service/
COPY apps/leangoo_file_service_web/mix.exs apps/leangoo_file_service_web/
COPY apps/leangoo_pubsub_web/mix.exs apps/leangoo_pubsub_web/
COPY apps/leangoo_rabbit/mix.exs apps/leangoo_rabbit/
COPY apps/leangoo_reminder/mix.exs apps/leangoo_reminder/
COPY apps/leangoo_reminder_web/mix.exs apps/leangoo_reminder_web/
COPY apps/leangoo_web/mix.exs apps/leangoo_web/
COPY apps/logger_file_backend/mix.exs apps/logger_file_backend/
COPY apps/oauth_gateway/mix.exs apps/oauth_gateway/
COPY apps/oauth_gateway_web/mix.exs apps/oauth_gateway_web/
COPY config config
# RUN no_proxy=192.168.0.100 mix deps.get \
# && mix deps.compile \
# && mix esbuild.install --if-missing
after build the image. enter it by manual
docker run --rm -it <the_docker_image> /bin/bash
run the mix task by manual, it compiles always successfully
no_proxy=192.168.0.100 mix deps.get \
&& mix deps.compile \
&& mix esbuild.install --if-missing
I will fork and replace :hackney with :req to see can fix it.
To Reproduce
Steps to reproduce the behavior:
- Using AppSignal for Elixir package version 2.12.0