[libcxx-commits] [PATCH] D110938: [libcxx][utils] Note read only mount and ptrace permission in container script

David Spickett via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Oct 18 06:52:50 PDT 2021


DavidSpickett updated this revision to Diff 380377.
DavidSpickett added a comment.

You're right the volume permissions are different for Linux vs Mac.
(probably Mac and Windows but I haven't tried Windows)

The legacy mode of docker for Mac uses osxfs:

  All processes in containers can access the same objects in the same way as the Docker user who started the containers.

https://docker-docs.netlify.app/docker-for-mac/osxfs/

Couldn't find any docs on the gRPC FUSE that it uses now but I assume it would behave
the same way for compatibility reasons.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110938/new/

https://reviews.llvm.org/D110938

Files:
  libcxx/utils/ci/run-buildbot-container


Index: libcxx/utils/ci/run-buildbot-container
===================================================================
--- libcxx/utils/ci/run-buildbot-container
+++ libcxx/utils/ci/run-buildbot-container
@@ -12,6 +12,12 @@
 # state in `/llvm` is shared between the container and the host machine, which
 # is useful for editing files on the host machine and re-running the build bot
 # in the container.
+#
+# If you are on Linux you will likely not be able to write to the mount because
+# the user in the container doesn't have permissions to do so.
+# If you need to do this, give that user permission to do so after running
+# the container or add this flag to run the container as your local user IDs:
+# --user $(id -u):$(id -g)
 
 set -e
 
@@ -21,4 +27,4 @@
     exit 1
 fi
 docker pull ldionne/libcxx-builder
-docker run -it --volume "${MONOREPO_ROOT}:/llvm" --workdir "/llvm" ldionne/libcxx-builder bash
+docker run -it --volume "${MONOREPO_ROOT}:/llvm" --workdir "/llvm" --cap-add=SYS_PTRACE ldionne/libcxx-builder bash


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110938.380377.patch
Type: text/x-patch
Size: 1026 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20211018/58492263/attachment.bin>


More information about the libcxx-commits mailing list