Skip to content

Commit

Permalink
.devcontainer: Document how to spin up a local devcontainer, and why …
Browse files Browse the repository at this point in the history
…not use podman.

There is a possible fix online, but the current situation is rootless Podman does not work for devcontainers (or at least our devcontainer).
  • Loading branch information
ivucica committed May 16, 2024
1 parent ed78b47 commit e5f4745
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.233.0/containers/bazel
//
// sudo apt install podman containers-storage
// npm set prefix ~/.npm
// npm install -g @devcontainers/cli
// ~/.npm/bin/devcontainer up --docker-path=/usr/bin/podman --workspace-folder .
//
// For vscode, needs settings change to use podman instead of docker.
//
// Note how podman is rootless and runs in ~/.local. container-storage allows use of
// overlay graph driver (see podman info, line graphDriverName, should be overlay
// instead of vfs). May need wipe with podman system reset before it's used after
// installing containers-storage.
//
// Sadly, it may still be preferable to:
// apt install docker.io; usermod -aG docker $USER; newgrp docker.
// due to permissions issues. For some reason, vscode implementation freezes, then
// upon window reload has 'root' as owner of /root and /workspaces and fails. Folders
// are also created with uid 1000, but then uid is changed to local uid (e.g. 501).
// Fixing with sudo chown $(id -u -n) /root && sudo chown -R $(id -u -n) /workspaces
// in postCreateCommand nor postAttachCommand did not help.
{
"name": "Bazel (Community)",
"build": {
Expand Down

0 comments on commit e5f4745

Please sign in to comment.