Closed JTomasi closed 9 months ago
I think the way things are set up, you need to have the .colcon/build
, .colcon/install
, and .colcon/log
folders existing on your host before starting the container.
And if they do exist, ensure that they are owned by your user! For example:
sudo chown -R <username> .colcon/build .colcon/install .colcon/log
Otherwise, if these folders do not exist, Docker will create them at volume mount time as root, which leads to the above errors. I'm very familiar with those :)
There is a strategy to modify the entrypoint to chown -R user <these_folders>
instead, but that involves more modifications than simply ensuring your folders exist on the host, and are owned by your user. But you can try this out if you'd like!
Making sure they existed before starting the container fixed it, thank you!
Hello,
Thanks for detailed guide and example repo! I've created a slightly modified version of your docker setup but I've encountered a colcon build issue related to permissions that I was hoping you might have some insight to.
After successfully running docker-compose up and entering the development container, I can't seem to run
colcon build
. When running this, colcon build returns the following error:PermissionError: [Errno 13] Permission denied: 'log/build_2023-11-27_23-16-18'
As part of my debugging, I tried changing the permissions in the Dockerfile from 0440 to 0777 here:
but this did not seem to make a difference.
One solution I've found is to remove the colcon build artifacts from the volume mount in the
docker-compose.yaml
file:So the issue seems to stem from the creation of the .colcon folder during the docker build. Do you have any insight into how to remedy this while keeping the .colcon artifacts as bind mounts?
Thanks again!