-
Notifications
You must be signed in to change notification settings - Fork 21
Description
I am trying to build arm64 docker images with Docker Desktop on macOS and seeing some packages fail to download during installation.
$ echo "FROM ocaml/opam:ubuntu-20.10-ocaml-4.12\nRUN opam install astring" > Dockerfile
$ docker buildx build --platform linux/arm64 .
Output:
...
------
> [2/2] RUN opam install astring:
#6 19.53 The following actions will be performed:
#6 19.53 - install ocamlfind 1.9.1 [required by astring]
#6 19.53 - install ocamlbuild 0.14.0 [required by astring]
#6 19.53 - install topkg 1.0.3 [required by astring]
#6 19.53 - install astring 0.8.5
#6 19.53 ===== 4 to install =====
#6 19.54
#6 19.54 <><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
#6 20.40 [ocamlfind.1.9.1] downloaded from http://download.camlcity.org/download/findlib-1.9.1.tar.gz
#6 21.11 [ocamlbuild.0.14.0] downloaded from https://github.com/ocaml/ocamlbuild/archive/0.14.0.tar.gz
#6 21.56 [ERROR] The sources of the following couldn't be obtained, aborting:
#6 21.56 - astring.0.8.5: Curl failed
#6 21.56 - topkg.1.0.3: Curl failed
#6 21.56
------
Dockerfile:2
--------------------
1 | FROM ocaml/opam:ubuntu-20.10-ocaml-4.12
2 | >>> RUN opam install astring
3 |
--------------------
error: failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c opam install astring]: exit code: 40
To try this you'd need to create a builder following the example here: https://www.docker.com/blog/multi-arch-images/
Wget also fails for the same packages when I do RUN echo 'download-command: wget' >> $HOME/.opam/config.
Most of my apps dependencies do get installed, with a certain subset always failing to download: topkg astring rresult fmt logs fpath bos cmdliner reason. Releases for all of these except Reason are hosted on the same server, erratique.ch, which might be a clue. My current workaround is to run opam pin add --dev <package> for each one of these before I call opam install --deps-only . in my build.
Apologies if this is the wrong place to report this.