Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mix: Building Docker image fails due to unavailable Erlang packages, e. g. erlang-crypto (no such package) #77

Closed
paulmenzel opened this issue Jan 13, 2022 · 5 comments
Labels

Comments

@paulmenzel
Copy link
Contributor

$ sudo docker build -t ejabberd/mix .
Sending build context to Docker daemon  7.168kB
Step 1/6 : FROM alpine:3.14
 ---> 0a97eee8041e
Step 2/6 : LABEL maintainer="ProcessOne <[email protected]>"       product="Ejabberd mix development environment"
 ---> Running in bd7fc6896765
Removing intermediate container bd7fc6896765
 ---> b87c58f9c9fc
Step 3/6 : RUN apk upgrade --update musl     && apk add build-base git zlib-dev openssl-dev yaml-dev expat-dev sqlite-dev     gd-dev jpeg-dev libpng-dev libwebp-dev autoconf automake bash     elixir erlang-crypto erlang-eunit erlang-mnesia erlang-erts erlang-hipe     erlang-tools erlang-os-mon erlang-syntax-tools erlang-parsetools     erlang-runtime-tools erlang-reltool erlang-odbc file curl     && rm -rf /var/cache/apk/*
 ---> Running in 8e56687c4901
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
OK: 6 MiB in 14 packages
ERROR: unable to select packages:
  erlang-crypto (no such package):
    required by: world[erlang-crypto]
  erlang-erts (no such package):
    required by: world[erlang-erts]
  erlang-eunit (no such package):
    required by: world[erlang-eunit]
  erlang-hipe (no such package):
    required by: world[erlang-hipe]
  erlang-mnesia (no such package):
    required by: world[erlang-mnesia]
  erlang-os-mon (no such package):
    required by: world[erlang-os-mon]
  erlang-parsetools (no such package):
    required by: world[erlang-parsetools]
  erlang-runtime-tools (no such package):
    required by: world[erlang-runtime-tools]
  erlang-syntax-tools (no such package):
    required by: world[erlang-syntax-tools]
  erlang-tools (no such package):
    required by: world[erlang-tools]
The command '/bin/sh -c apk upgrade --update musl     && apk add build-base git zlib-dev openssl-dev yaml-dev expat-dev sqlite-dev     gd-dev jpeg-dev libpng-dev libwebp-dev autoconf automake bash     elixir erlang-crypto erlang-eunit erlang-mnesia erlang-erts erlang-hipe     erlang-tools erlang-os-mon erlang-syntax-tools erlang-parsetools     erlang-runtime-tools erlang-reltool erlang-odbc file curl     && rm -rf /var/cache/apk/*' returned a non-zero code: 10
@paulmenzel
Copy link
Contributor Author

erlang-crypto does not seem to be in Alpine since version 3.12.

@paulmenzel
Copy link
Contributor Author

paulmenzel commented Jan 13, 2022

@badlop
Copy link
Member

badlop commented Jan 13, 2022

Right, several erlang-* subpackages were incorporated into erlang package since Alpine 3.12, no need to install them individually. I'm improving the Github Action to test mix compilation, and later will review which of the remaining subpackages are really required.

@badlop
Copy link
Member

badlop commented Jan 13, 2022

Ah, thanks! The link you found mentions exactly what changed. After applying the corresponding changes badlop@96d6f0e
the mix image builds correctly, and the ecs based on it too https://github.com/badlop/docker-ejabberd/actions/runs/1692151131

@badlop badlop added the bug label Jan 13, 2022
@paulmenzel
Copy link
Contributor Author

Yes, I locally did the same change independently, I was able to build everything myself. Maybe use

mix: Fix build with Alpine ≥ 3.12 by removing non-existent erlang subpackages

Many erlang subpackages were included into erlang since Alpine 3.12.

Resolves: #77

badlop added a commit that referenced this issue Jan 13, 2022
Many erlang subpackages are included in erlang package since Alpine 3.12.
@badlop badlop closed this as completed Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants