artemkin / git-lfs-server

Git LFS server
Other
140 stars 20 forks source link

Cannot build docker image: "[ERROR] No switch 4.04.2 is currently installed." #15

Open ianhinder opened 5 years ago

ianhinder commented 5 years ago

I cannot build the provided docker image. I get:

$ sudo docker build . -t git-lfs-server
[cut]
Step 24/27 : RUN su - test -c 'opam switch 4.04.2'
 ---> Running in abed75f14b51
[ERROR] No switch 4.04.2 is currently installed. Did you mean 'opam switch create 4.04.2'?
        Installed switches are:
          - default

Removing that line then gives

Step 25/26 : RUN su - test -c 'opam install async async_ssl cohttp cohttp-async cryptokit yojson simple_pam utop'
 ---> Running in c3dec28be258
The following dependencies couldn't be met:
  - cohttp-async -> ocaml >= 4.03.0
      base of this switch (use `--unlock-base' to force)

No solution found, exiting

I think the problem is that the Ubuntu trusty version of Ocaml is too old for the current version of cohttp-async.

I tried changing the base Dockerfile image to ubuntu:bionic, and I get further, but then it fails to compile several packages:

[ERROR] The compilation of conf-zlib failed at "/usr/bin/pkg-config zlib".
...
[ERROR] The compilation of ctypes failed at "/usr/bin/make XEN=disable ctypes-foreign".
...
[ERROR] The compilation of ppx_inline_test failed at "/home/test/.opam/default/bin/jbuilder build -p ppx_inline_test -j 1".
[ERROR] The compilation of ppx_js_style failed at "/home/test/.opam/default/bin/jbuilder build -p ppx_js_style -j 1".
[ERROR] The compilation of ppx_let failed at "/home/test/.opam/default/bin/jbuilder build -p ppx_let -j 1".
[ERROR] The compilation of ppx_optional failed at "/home/test/.opam/default/bin/jbuilder build -p ppx_optional -j 1".
[ERROR] The compilation of ppx_pipebang failed at "/home/test/.opam/default/bin/jbuilder build -p ppx_pipebang -j 1".
[ERROR] The compilation of ppx_sexp_conv failed at "/home/test/.opam/default/bin/jbuilder build -p ppx_sexp_conv -j 1".
[ERROR] The compilation of variantslib failed at "/home/test/.opam/default/bin/jbuilder build -p variantslib -j 1".
[ERROR] The compilation of ppx_fields_conv failed at "/home/test/.opam/default/bin/jbuilder build -p ppx_fields_conv -j 1".
#=== ERROR while compiling uri.3.0.0 ==========================================#
# path                 ~
# command              /bin/cp -PRp /home/test/.opam/default/.opam-switch/sources/uri.3.0.0 /home/test/.opam/default/.opam-switch/build/uri.3.0.0
# exit-code            1
# env-file             ~/.opam/log/log-7-6667f8.env
# output-file          ~/.opam/log/log-7-6667f8.out

I could keep debugging, but I think it would benefit from the eyes of an ocaml expert!

artemkin commented 4 years ago

Yeah, you are right. I didn't update this project for a while.