Run as unprivileged user in container in a new user namespace

This prevents the build from accidentally modifying system files in
the container, and increases security.

Test Plan:
    scripts/destroy_container.sh; scripts/create_container.sh && scripts/run_in_container.sh id
    # uid=1000(1000) gid=1000 groups=1000

    bazel run scripts:launch
    # works

X-Origin-Diff: phab/D212
GitOrigin-RevId: 74af18ee49cf48e45440e12e9efe36e57be5f18d
1 file changed
tree: e6be5233989911dd21f2d74a170199a396793054
  1. build/
  2. cmd/
  3. internal/
  4. pkg/
  5. scripts/
  6. .bazelignore
  7. .bazelrc
  8. BUILD
  9. README.md
  10. WORKSPACE
README.md

Smalltown Operating System

Run build

The build uses a Fedora 30 base image with a set of dependencies. Guide has been tested on a Fedora 30 host, with latest rW deployed.

Build the base image:

podman build -t smalltown-builder .

Launch the VM:

scripts/bin/bazel run scripts:launch

Exit qemu using the monitor console: Ctrl-A c quit.