jekyll: Avoid mk_dir permission error in jekyll 4 on azure build pipeline/docker

I solved my issue but guessed someone may search for it or you may change something anyway for jekyll4, I dont know?!


I upgraded my blog (src) to jekyll 4 pre alpha 1 and run into issues in the build pipeline of azure devops:

/usr/local/lib/ruby/2.6.0/fileutils.rb:239:in `mkdir’: Permission denied @ dir_s_mkdir - /srv/jekyll/.jekyll-cache (Errno::EACCES)

It uses the jekyll/builder docker image to build the actual site. Long story short, adding an empty directory “.jekyll-cache” to my blog source solved the issue.

For reference, here is my currently working azure-pipelines.yml

not sure, what could be done or what the real issue is here?!

My Environment

Software Version(s)
Operating System docker: jekyll/builder
jekyll 4.0.pre.alpha1
github-pages no

my gemfile.lock

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Reactions: 4
  • Comments: 15 (5 by maintainers)

Commits related to this issue

Most upvoted comments

Just received this error using jekyll/builder:latest via Github Actions CI.

Running mkdir .jekyll-cache _site before the docker jekyll command resolved this issue for me.

The issue seems to be still open.

Just in case anyone looking for a dirty workaround, here is my docker-compose.yml with binding current directory to the faulty /srv/jekyll :

version: '3.4'

services:
  jeckyll:
    image: jekyll/jekyll
    command: jekyll build
    volumes:
      - type: bind
        source: .
        target: /srv/jekyll

Dear fabsenet , using jekyll/jekyll in a SVN (I know we’re on GIT here) post commit hook on the “mkdir /srv/jekyll/.jekyll-cache (Errno::EACCES)”-bug did cost a lot of time with no remedy in sight. You probably saved the project. Thanks a lot Albrecht