godotengine / godot-website

The code for the official Godot Engine website. A static site built using Jekyll.
https://godotengine.org
MIT License
294 stars 142 forks source link

Docker volume permissions problem. #672

Closed cissusnar closed 1 year ago

cissusnar commented 1 year ago

before run docker command docker run --rm --volume="$PWD:/srv/jekyll" -it jekyll/jekyll:stable ./build.sh, It need chown 1000:1000 to the source path. if you don't change the permissions, it will always prompt a 'Could not locate Gemfile' error. I'm not a ruby user, this is really make me confused, because the Gemfile is existed, and the current user (root) can access the path. until I run the command BUNDLE_GEMFILE=./gemfile bundle install, that give me a real message about [!] There was an error parsing `Gemfile`: There was an error while trying to read from `/srv/jekyll/Gemfile`. It is likely that you need to grant read permissions for that path.. Bundler cannot continue.. please fix it in README, save some time to others.

YuriSizov commented 1 year ago

I don't quite understand, do you have a permission issue on your host system (if so, which platform are you on?) or do you experience permission issues in the docker container itself (in which case it's rather weird, as we haven't seen this problem before while running from Linux, macOS, or Windows).

cissusnar commented 1 year ago

The default user of jekyll's docker image is root, but when you run bundle command, it will run as a non-root user that is jekyll and the uid is 1000. If you are running from Linux or Windows(wsl) host, It may be no permission issues, because the default non-root user's uid of almost distributions is 1000.

this is may be not a issue, I'll close it : )