Im using a remote linux devcontainer as my dev environment, but having a major issue. the container is built and run runs as the root user. i am mounting an external volume that is written to. i also install dbs that have external volumes that written to.
My problem is as im experimenting with the container to get it right - i sometimes want to just wipe those mounted directories and files as the host user, but i cant since i dont have permissions (container root user created them). I came across this article that seems to be close to what i want:
https://jtreminio.com/blog/running-docker-containers-as-current-host-user/
The question i have is from vscode's devcontainer.json or from the docker-compose.yml, how do i pass these the args to docker?
docker image build \
--build-arg USER_ID=$(id -u ${USER}) \
--build-arg GROUP_ID=$(id -g ${USER}) \