chronos icon indicating copy to clipboard operation
chronos copied to clipboard

Allow launching privileged docker containers

Open PAStheLoD opened this issue 10 years ago • 11 comments

It'd be very useful to run docker-in-docker for example. And exposing the feature as a simple JSON attribute should be pretty easy.

PAStheLoD avatar Apr 03 '15 14:04 PAStheLoD

+1

nspforever avatar Apr 30 '15 05:04 nspforever

+1

I need to mount HDFS or whatever in docker container.

feisuzhu avatar May 25 '15 05:05 feisuzhu

@PAStheLoD could you please show more information with you. don't know why reason need run privileged docker.

xiaods avatar Jan 07 '16 11:01 xiaods

We're running a patched version of Chronos (--privileged hacked in), to build docker images.

Basically, we use docker-in-docker to build and push to a private registry (running on Marathon/Mesos too), and then start the freshly built container as a Marathon service.

PAStheLoD avatar Jan 07 '16 13:01 PAStheLoD

+1 We run a docker container that is building a database in a docker container who needs to be pushed to a private registry. We need to mount inside the container a directory.

exnerd avatar Feb 15 '16 10:02 exnerd

+1 docker in docker is also what I need. Any news on this?

Update:

I think this works:

"parameters": [
                {"key": "privileged", "value": "true"}
            ],

ciokan avatar Dec 15 '16 04:12 ciokan

Another use case is to run batches on gpu slaves... So basically the jo is not executed since mesos requires privileged mode to use those slaves.

milipili avatar Aug 10 '17 02:08 milipili

I could use this.

matthewmrichter avatar Sep 12 '18 21:09 matthewmrichter

It should be possible to add a privileged field to the job definition and to Chronos' TaskInfo builder set ContainerInfo.privileged based on that.

I don't have time to implement this change myself, but if someone wants to volunteer, I could review and merge the PRs.

gkleiman avatar Sep 12 '18 22:09 gkleiman

Actually, privileged is no longer good anyway. We no longer run tasks on gpu with privileged mode. But a gpu parameter would be a good addition. More basically, we should simply be able to put a marathon json (gpu, constraints, mesos containerizer options...)

milipili avatar Sep 13 '18 05:09 milipili

Yeah, finer grain control is needed for leveraging things like RexRay etc..

matthewmrichter avatar Sep 13 '18 12:09 matthewmrichter