AinD: Android in Docker
github.com
github.com
Could someone (or OP) enlighten me on what requires this flag? I thought the container would also get access to the anbox kernel modules that I have installed already.
--privileged is required for nesting an Anbox (LXC) inside Docker. But you don't need to worry too much because Anbox launches "unprivileged" LXC using user namespaces. You can confirm that all Android process are running as non-root users by executing `docker exec aind ps -ef`.
I'm a big fan of people supplying pre-built docker images because it lets me try out their software in what I assume to be a sandbox. I'm a little less wary when it comes to docker -- almost to the point of being nonchalant, running random images willy-nilly without digging into the source code even a tiny bit. Granted, that behavior is probably gonna bite me in the ass one day. But it's definitely better than the `curl http://example.com | bash -` and `sudo make install` patterns.
Whenever I see someone's instructions telling me to use `docker --network=host` or `docker --privileged`, I can't help but panic a little... "Am I going to regret running this developer's code as root on my machine?" A little justification from the OP eases my mind, that's all. Which he did :)
I wouldn't agree that it's trivially possible to breakout of a default configured Docker container, not every attacker is packing a Linux Privesc 0-day and the knowledge to use it.
Containers are broken by default because they share a kernel. If you want to use a container to have a replicable build environment fine - but for operational use in the context of "being secure" - no no no no.
Probably aind doesn't work with rootless Docker currently mostly because of squashfs stuff, but I believe we can workaround that relatively easily.
That's why --privileged is generally a bad idea, unless you really need it, as it removes the isolation that Docker adds.
Not mentioned as a purpose..
I can add it to the scope of the project if it works.
The biggest advantage of running Android on cloud/edge I think is anti-theft.
Also, it will be soon able to run multiple aind pods on Kubernetes with distinct UID mappings. (I need to submit patches to Anbox upstream)
what is this anti-theft? What's being stolen?
Someone steals your smartphone now -> they've got everything , and a smartphone
vs
Someone steals your clouded smartphone -> they've got an empty smartphone and no data.
aind is expected to be used only for sensitive apps, with more strong passcode.