[opam-devel] OPAM Dockerfiles set OPAMSWITCH

David Sheets sheets at alum.mit.edu
Tue Feb 23 12:28:39 GMT 2016

The Docker containers described by
https://github.com/ocaml/opam-dockerfiles somehow set the OPAMSWITCH
environment variable. I haven't been able to find where or why this
variable has been set and it causes many opam commands to be more
heavyweight than necessary which makes interactive use annoying. For
instance, after switching compilers, you must run something like

eval `opam config env --switch=system`

if OPAMSWITCH is set. When is OPAMSWITCH necessary? Why? What sets it?

I'm really enjoying using the opam Docker containers because it means
that a fresh, minimal, throwaway OPAM install is just a `docker run
-it --rm -v ~/Code:/Code:rw ocaml/opam:alpine-3.3_ocaml-4.02.3 ash`
away. Thanks, avsm!

More information about the opam-devel mailing list