Open sergio-ns opened 3 years ago
Very very similar problems here - I seemed to have made progress using JEKYLL_ROOTLESS
rather than JEKYLL_UID
and JEKYLL_GID
(https://github.com/envygeeks/jekyll-docker/blob/master/repos/jekyll/copy/all/usr/jekyll/bin/entrypoint)
Observed same issue with jekyll/jekyll:4.2.0
Errno::EACCES: Permission denied @ rb_file_s_rename - (/home/jekyll/.local/share/gem/ruby/2.7.0/cache/rexml-3.2.5.gem, /usr/gem/cache/rexml-3.2.5.gem)
Does not seem to be related to a configuration issue but a problem within the container.
I confirm that using JEKYLL_ROOTLESS works as following
version: '3'
services:
new:
image: jekyll/builder:4.2.0
container_name: jekyll
volumes:
- /share/DockerVolumes/jekyll:/srv/jekyll
command: 'jekyll new mysite'
environment:
- JEKYLL_ROOTLESS=true
I can confirm this works with the current image jekyll/jekyll
. The image jekyll/jekyll:pages
still fails
Unfortunately doesn't work with the latest image. I can confirm that it does work with 4.2.0 image though.
Hey @mpetuska can you provide a log output with -e DEBUG=true
?
Ok, not sure what's going on, but this now works for me (notice :z
volumes)
podman run -ti --rm -w $PWD -v $PWD:$PWD:Z -e JEKYLL_ROOTLESS=1 --network=host docker.io/jekyll/jekyll:latest jekyll help
I have run into this issue in Drone. I set these environment variables:
environment:
JEKYLL_ROOTLESS: "1"
JEKYLL_UID: "0"
JEKYLL_GID: "0"
DEBUG: "true"
To no avail. The debug output suggests that the UID and GID are not set to 0
, though:
+ su-exec jekyll /usr/local/bin/bundle clean
+ true
+ ruby --version
ruby 3.1.1p18 (2022-02-18 revision 53f5fc4236) [x86_64-linux-musl]
+ sup_args=
+ exe=/usr/local/bundle/bin/jekyll
+ '[' 4.2.2 '=' pages ]
+ '[' -x /usr/local/bundle/bin/jekyll ]
+ exec su-exec jekyll bundle exec ruby /usr/local/bundle/bin/jekyll build --destination _site
+ exe=/usr/local/bin/bundle
+ default-gem-permissions
+ set -e
++ id -u
+ '[' 1000 = 0 ']'
+ set -e
+ [[ ! -f Gemfile ]]
++ id -u
+ '[' 1000 '!=' 0 ']'
I worked around this issue by first creating the directory:
commands:
- mkdir _site
- jekyll build --destination _site
Without mkdir _site
, it fails with:
jekyll 3.9.3 | Error: Permission denied @ dir_s_mkdir - /drone/src/_site
/usr/local/lib/ruby/3.1.0/fileutils.rb:243:in `mkdir': Permission denied @ dir_s_mkdir - /drone/src/_site (Errno::EACCES)
(No idea why it says 3.9.3; I'm running jekyll/jekyll:4`.)
Hello, after finding a workaround to #302 I've not got another permission denied problem.
See my docker-compose below.
User jekyll (UID/GID: 1000) has full privileges on dir /share/DockerVolumes/jekyll but the permission error seems to happen inside the container (I don't have a /homes/keyll directory on my system). When I run:
docker-compose up new
I get: