If the DOCKER_HOST environment variable is set to point somewhere other than the local machine (i.e., the docker service is running somewhere without access to the local filesystem), then the volume-mounts don't work as expected. As a result, any minimesosFile in the current directory is ignored, and the default configuration is used instead. If a different path was specified via the --clusterConfig option, then the command fails when it can't locate the specified file within the container.
There doesn't seem to be simple way to work around the volume-mounting issue. However, I've been able to at least work around the minimesosFile issue by doing the following in my minimesos script:
docker create the container for the minimesos-cli (replacing docker run).
docker cp the target minimesosFile to a default location within the newly-created container.
docker start to run the container, which now contains the desired configuration file.
If the
DOCKER_HOST
environment variable is set to point somewhere other than the local machine (i.e., the docker service is running somewhere without access to the local filesystem), then the volume-mounts don't work as expected. As a result, anyminimesosFile
in the current directory is ignored, and the default configuration is used instead. If a different path was specified via the--clusterConfig
option, then the command fails when it can't locate the specified file within the container.There doesn't seem to be simple way to work around the volume-mounting issue. However, I've been able to at least work around the
minimesosFile
issue by doing the following in myminimesos
script:docker create
the container for the minimesos-cli (replacingdocker run
).docker cp
the targetminimesosFile
to a default location within the newly-created container.docker start
to run the container, which now contains the desired configuration file.