Skip to content

hcsshim error in opam:windows-mingw-21h2-ocaml-4.13 on ocp-indent installation during docker build #183

Open
@Ant1-Provot

Description

@Ant1-Provot

Hi !

I'm facing an unexpected hcsshim error while building a docker image on a 2022 windows server.

Expected Behavior

Running docker build --file .\docker_crash.dockerfile . should terminate well, exit with code 0 and create an image

Current Behavior

PS C:\Users\antoine\workspace\crash_docker> docker build --file .\crash.dockerfile .
Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM ocaml/opam:windows-mingw-21H2-ocaml-4.13
 ---> 19a930a68fb9
Step 2/2 : RUN opam install -y ocp-indent
 ---> Running in b82f3794bd3f
The following actions will be performed:
  - install dune       3.3.1 [required by ocp-indent]
  - install ocamlfind  1.9.5 [required by ocp-indent]
  - install cmdliner   1.1.1 [required by ocp-indent]
  - install base-bytes base  [required by ocp-indent]
  - install ocp-indent 1.8.1
===== 5 to install =====

<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[cmdliner.1.1.1] downloaded from https://erratique.ch/software/cmdliner/releases/cmdliner-1.1.1.tbz
[ocamlfind.1.9.5] downloaded from http://download.camlcity.org/download/findlib-1.9.5.tar.gz
[dune.3.3.1] downloaded from https://github.com/ocaml/dune/releases/download/3.3.1/dune-3.3.1.tbz
[ocp-indent.1.8.1] downloaded from https://github.com/OCamlPro/ocp-indent/archive/1.8.1.tar.gz

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> installed cmdliner.1.1.1
-> installed dune.3.3.1
-> installed ocamlfind.1.9.5
-> installed base-bytes.base
-> installed ocp-indent.1.8.1
Done.

<><> ocp-indent.1.8.1 installed successfully ><><><><><><><><><><><><><><><><><>
=> This package requires additional configuration for use in editors. Install package 'user-setup', or manually:

   * for Emacs, add these lines to ~/.emacs:
     (add-to-list 'load-path "C:/opam/.opam/4.13/share/emacs/site-lisp")
     (require 'ocp-indent)

   * for Vim, add this line to ~/.vimrc:
     set rtp^="C:/opam/.opam/4.13/share/ocp-indent/vim"
# Run eval $(opam env --root=C:/opam/.opam) to update the current shell environment
re-exec error: exit status 1: output: hcsshim::ImportLayer - failed failed in Win32: The system cannot find the path specified. (0x3)

Failure Information

Narrowing the field of research pointed to the ocp-indent package, however I don't understand why it breaks images layers.
I tested all the ocp-indent dependencies individually and the crash did not happen.

Steps to Reproduce

To reproduce, please follow the following few steps:

  1. On a 2022 windows server with docker running, create crash.dockerfile with the following:
FROM ocaml/opam:windows-mingw-21H2-ocaml-4.13

RUN opam install -y ocp-indent
  1. Run the following command in powershell with admin rights :
docker build --file .\crash.dockerfile .

Context

The machine :

Windows Server 2022 Datacenter
Version 21H2
Build 20348.825

The docker environment:

Client Version:  20.10.9
Engine Version:  20.10.9

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions