I've been playing around, trying to combine tup and Docker to build things, I though I'd post my current progress, in case anyone's interested
There are two approaches, but neither of them work, I'll explain below.
Tup in Docker:Tup requires access to /dev/fuse, so you have to run the container with some extra privileges [1] (NB: due to a bug [2] you seem to have to use "--privileged").
Once this works, tup still fails; because docker uses cgroups to isolate the PID namespace, but fuse bypasses this.
tup sees PIDs from within the cgroup scope, but fuse reports PIDs from the kernel's scope.
tup fuse warning: Process pid=7096, uid=1000, gid=1000 is trying to access the tup server's fuse filesystem.
unique: 3, error: -1 (Operation not permitted), outsize: 16
There's a new "--pid" option in development [3] which should disable PID isolation, which might make this approach viable.
Docker from Tup:This approach is unsuitable because Docker is a system daemon, so what tup will see is the docker client binary reading local files, and talking to a server socket.
The docker containers may:
- build from uploaded content
- build from system-wide loaded images
- build from internet content
- mount filesystems into the container
The above is thoroughly likely to mess up any dependency tracking, and filesystem access tracking.
[1]
http://docs.docker.com/reference/run/#runtime-privilege-linux-capabilities-and-lxc-configuration)
[2]
https://github.com/docker/docker/issues/10184[3]
https://github.com/docker/docker/issues/6687Marcus