h4l/dev-container-docker-compose-volume-or-bind

Permission denied error

joezappie opened this issue · 3 comments

Awesome work on this, I've been trying to figure out how to do this for almost a day now so this is a life saver.

Just wanted to mention that when setting this up in my project, I got a permission denied error on the gen-docker-compose-workspace-env.sh script. Might be worth adding to the README that you have to make this script executable. Since this made my compose script fail, I opened in a recovery container and ran chmod +x ./devcontainer/gen-docker-compose-workspace-env.sh. Someone else might get stuck on that so wanted to provide some feedback on it.

Hopefully they figure out how to support this natively so such a complex script isnt needed.

h4l commented

Thanks for the feedback @jrj2211, good to hear you found it useful! I had a similar experience myself.

And thanks for reporting this problem you had. I just checked and the script is marked as executable in the repo itself. When you set up your devcontainer config, did you do it by cloning this repo or copying the files? Perhaps if you were copying, the executable permission got lost?

If so, does this change seem OK to you? #2

It would be nice if they added native support for this. And also if they standardised the devcontainer config format so that other IDEs could share container-based dev environments!

Ahh yes, I should have mentioned that I manually copied the files into my project as needed. Perfect :) I think #2 clarifies it well, thanks!

Side Note: Docker seems to be trying to do just that with their new "Dev Environments" feature. I've seen them comment on people requesting devcontainer support saying that they are trying to stay away from that to make a more generic solution that any IDE can adopt. Still needs a lot of work to catch up to devcontainers functionality but its definitely a promising feature.

h4l commented

Great, I'll merge that.

"Dev Environments" does sound promising & interesting, I'll have to give it a try, cheers.