mix_docker
mix_docker copied to clipboard
Error caused by Alpine repository conficts "ERROR: unsatisfiable constraints"
Thanks for this amazing library.
I'm including PR to this issue
I've noticed that the Dockerfile.build points to Alpine edge repo. The pages versions there were changed and this caused error below
Sending build context to Docker daemon 20.43MB
Step 1/12 : FROM bitwalker/alpine-erlang:19.3.4
19.3.4: Pulling from bitwalker/alpine-erlang
43d680a959df: Pulling fs layer
f9ea58018904: Pulling fs layer
8787bc84edab: Pulling fs layer
43d680a959df: Verifying Checksum
43d680a959df: Download complete
43d680a959df: Pull complete
f9ea58018904: Pull complete
8787bc84edab: Verifying Checksum
8787bc84edab: Download complete
8787bc84edab: Pull complete
Digest: sha256:6ebee1ec696ceaa6ee0ca037d4c6d84b29d68e2f6554ef30fb281e38076df7fc
Status: Downloaded newer image for bitwalker/alpine-erlang:19.3.4
---> 0b1b039ea6f4
Step 2/12 : ENV HOME /opt/app/ TERM xterm
---> Running in 33bd66402555
---> 19c4059a1814
Removing intermediate container 33bd66402555
Step 3/12 : RUN echo "@edge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && apk --update upgrade musl && apk --no-cache add git make g++ elixir@edge=1.4.4-r0 && rm -rf /var/cache/apk/*
---> Running in a44019b174a5
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz
fetch http://nl.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch http://nl.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
(1/2) Upgrading musl (1.1.16-r10 -> 1.1.16-r13)
(2/2) Upgrading musl-utils (1.1.16-r10 -> 1.1.16-r13)
Executing busybox-1.26.2-r5.trigger
OK: 34 MiB in 25 packages
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz
fetch http://nl.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch http://nl.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
elixir-1.4.2-r0:
breaks: world[elixir=1.4.4-r0]
The command '/bin/sh -c echo "@edge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && apk --update upgrade musl && apk --no-cache add git make g++ elixir@edge=1.4.4-r0 && rm -rf /var/cache/apk/*' returned a non-zero code: 1
** (MatchError) no match of right hand side value: {%IO.Stream{device: :standard_io, line_or_bytes: :line, raw: false}, 1}
lib/mix_docker.ex:180: MixDocker.system!/2
lib/mix_docker.ex:150: MixDocker.with_dockerfile/2
lib/mix_docker.ex:20: MixDocker.build/1
(mix) lib/mix/task.ex:300: Mix.Task.run_task/3
(mix) lib/mix/cli.ex:58: Mix.CLI.run_task/2
Important fragment
ERROR: unsatisfiable constraints:
elixir-1.4.2-r0:
breaks: world[elixir=1.4.4-r0]
I solved it changing Dockerfile.build to latests stable Alpine repo which is now version 3.6.
And I've changed Elixir version to 1.4.2.
Also when packaging app, make sure to set up Elixir version the mix.exs
def project do
[...
elixir: "~> 1.4.2",
...]
end
I'm having the same issue, but these changes work for me as well.
Thanks @bpietraga . You saved my day.
version numbers have jumped since then: https://hub.docker.com/r/bitwalker/alpine-erlang/tags/
any recommendations for me? I'm having the same problems -- I'll keep trying and update if I find one that works...
I get the same error. How can I resolve this?