[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MirageOS-devel] Opam Docker Permissions Issue?



Hi Folks,
I've been reading about Mirage for quite a while now and would like to start 
making
some contributions (well as much as somebody that is just learning OCaml).

Unfortunately I'm stuck on build problem with the simple Dockerfile listed on 
https://github.com/ocaml/opam-dockerfiles.

FROM ocaml/opam:ubuntu-15.10_ocaml-4.02.3
RUN opam remote add dev git://github.com/mirage/mirage-dev
RUN opam depext -i mirage

The error output is:
Fatal error:
# opam-version    1.2.2 (c968888614d3fdbac881d3b7b8ef32ee97839807)
# os              linux
opam: "open" failed on /home/opam/.opam/log/command-5-5a61c5.out: Permission 
denied


If I add some further RUN commands to look at the before/after permissions of 
the listed directory it appears
that the "opam remote add..." command is changing ownership from opam -> root, 
which subsequently breaks other
commands.

Any pointers appreciated.

Thanks,
Chris

 
box:tmp composmin$ mkdir ocaml-opam-test
box:tmp composmin$ cd ocaml-opam-test/
box:ocaml-opam-test composmin$ vi Dockerfile
box:ocaml-opam-test composmin$ cat Dockerfile
FROM ocaml/opam:ubuntu-15.10_ocaml-4.02.3
 
RUN echo "Before:" && ls -la /home/opam/.opam/log
RUN opam remote add dev git://github.com/mirage/mirage-dev
RUN echo "After:" && ls -la /home/opam/.opam/log
RUN opam depext -i mirage
 
box:ocaml-opam-test composmin$ docker build --pull -t opam-test .
Sending build context to Docker daemon 2.048 kB
Step 1 : FROM ocaml/opam:ubuntu-15.10_ocaml-4.02.3
ubuntu-15.10_ocaml-4.02.3: Pulling from ocaml/opam
Digest: sha256:aff8eac70399c7b6269de5a07f60ccaf374acc5af44c9a71aff9ba2cb91c927c
Status: Image is up to date for ocaml/opam:ubuntu-15.10_ocaml-4.02.3
 ---> 2388514aa182
Step 2 : RUN echo "Before:" && ls -la /home/opam/.opam/log
 ---> Running in cd167d3bba1a
Before:
total 8
drwxr-xr-x 2 opam opam 4096 Jun 20 12:06 .
drwxr-xr-x 9 opam opam 4096 Jun 20 12:04 ..
 ---> 2ef96a86baea
Removing intermediate container cd167d3bba1a
Step 3 : RUN opam remote add dev git://github.com/mirage/mirage-dev
 ---> Running in 49ecee67dcf0
[dev: git]
[dev: git]
[dev: git]
[dev: git]
[dev: git]
[dev: git]
[dev] git://github.com/mirage/mirage-dev updated
 ---> 58d76956fd4b
Removing intermediate container 49ecee67dcf0
Step 4 : RUN echo "After:" && ls -la /home/opam/.opam/log
 ---> Running in 00edd5782303
After:
total 8
drwxr-xr-x 2 root root 4096 Nov  9 12:24 .
drwxr-xr-x 1 opam opam 4096 Nov  9 12:24 ..
 ---> 9fd22b8cca7f
Removing intermediate container 00edd5782303
Step 5 : RUN opam depext -i mirage
 ---> Running in 389c891daf68
Fatal error:
# opam-version    1.2.2 (c968888614d3fdbac881d3b7b8ef32ee97839807)
# os              linux
opam: "open" failed on /home/opam/.opam/log/command-5-5a61c5.out: Permission 
denied
The command '/bin/sh -c opam depext -i mirage' returned a non-zero code: 1
 
_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.