Starting with the Docker tutorial, I modify the Dockerfile to contain just
FROM mcr.microsoft.com/vscode/devcontainers/base:0-jammy
RUN mkdir proc && mount --bind /proc ./foo
From the directory hosting the Dockerfile I issue command
docker build -t getting-started .
I expect this docker image to mount /proc
at ./foo
during the build, but I actually get:
> [2/2] RUN mkdir foo && mount --bind /proc ./foo:
#5 0.399 mount: /foo: permission denied.
Is there a way to grant permissions to the build process so it can mount proc inside the Docker image?