From 911ee022fd567b8b07fedceff0bf01a2ade1432c Mon Sep 17 00:00:00 2001 From: Nirmal Patel Date: Fri, 6 Dec 2024 14:31:28 -0500 Subject: [PATCH] changed to make it work with Docker Desktop on windows --- .devcontainer/devcontainer.json | 8 +++++--- docker/ubuntu2404/base/Dockerfile | 4 ++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index a44256a86b5be..527b50c5f4ac8 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -16,9 +16,11 @@ ], "containerUser": "ubuntu", "remoteUser": "ubuntu", - "runArgs": [ - "--userns=keep-id" - ], + // When using devcontainer with podman, you may see /workspace being owned + // by root. To work around this, uncomment the following lines + // "runArgs": [ + // "--userns=keep-id" + // ], "customizations": { "vscode": { "extensions": [ diff --git a/docker/ubuntu2404/base/Dockerfile b/docker/ubuntu2404/base/Dockerfile index f2ded27d90ef7..f62eb1109544c 100644 --- a/docker/ubuntu2404/base/Dockerfile +++ b/docker/ubuntu2404/base/Dockerfile @@ -43,3 +43,7 @@ ENV PATH="/usr/lib/llvm-18/bin:${PATH}" # Update pip and install black and pre-commit. RUN pip3 install black pre-commit --break-system-packages + +# Create .cache directory with proper ownership. We will mount a named volume +# at this location to allow caching of bazel build files. +RUN mkdir /home/ubuntu/.cache && chown -R ubuntu:ubuntu /home/ubuntu/.cache