Commit 95b80d1 made the dev container persistent between invocations,
but hard-coded `docker` again. This change fixes that and also adds
further improvements:
- Do not use `--privileged` with podman. If the rootless user has
permissions to access `/dev/kvm`, so will the container.
- Map `/dev/vhost-net` and `/dev/vhost-vsock` as well.
- Use `BASH_SOURCE` to find this script's directory. As we're using Bash
to start with, this is more robust than using plain `$0`.
BUG=None
TEST=Run `./tools/dev_container cargo build` with Podman and Docker
Change-Id: I05c699f327c8e1c4f3c4df9679ee92bf7e609e2e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3295372
Reviewed-by: Dennis Kempin <denniskempin@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Christian Blichmann <cblichmann@google.com>
crosvm is a virtual machine monitor (VMM) based on Linux’s KVM hypervisor, with
a focus on simplicity, security, and speed. crosvm is intended to run Linux
guests, originally as a security boundary for running native applications on the
Chrome OS platform. Compared to QEMU, crosvm doesn’t emulate architectures or
real hardware, instead concentrating on paravirtualized devices, such as the
virtio standard.
crosvm is currently used to run Linux/Android guests on Chrome OS devices.
For contribution, see
the contributor guide.
Mirror repository is available at
GitHub for your convenience, but we
don't accept bug reports or pull requests there.