-
Notifications
You must be signed in to change notification settings - Fork 423
Description
I have been trying desperately to get the cross command working in a gitlab CI.
The problem is really what happens when cross tries to mount via '-v' when the docker daemon is not running on the same machine (so either by mounting '/var/run/docker.sock' or by setting 'DOCKER_HOST=tcp://something:2375').
It seems that when you pass a '-v' command to the docker binary, it mounts drives relative to where the docker daemon is running, and not relative to where the docker binary is running.
So, in a configuration like docker:dind, cross tries to mount non-existent directories outside of the container is running in, failing miserably and returning "cargo: not found".
The only alternative I have found is to run the daemon inside the same container.
Now, because the docker daemon is quite heavy, in terms of computing power, it is not efficient to do so.
Imagine spawning 10 containers running the 'cross' command, you would have to spawn 10 daemons just so that 'cross' can mount the folders properly.
I know that Travis works with cross. The fact is that I have no idea how Travis manages to do so, but there are cases where using, and being limited to, Travis, is not ideal.
In the commercial, enterprise world, there are usually strict requirements on hosting the code only on company servers on company locations. And because Travis is not something one can run locally, like Gitlab or Bamboo, one is stuck with the usual cargo commands without having the possibility to use 'cross'.
Is there an alternative, or a way to solve this issue?