Giter Club home page Giter Club logo

jekyll-serve's Introduction

Jekyll in a Docker Container

GitHub Super-Linter Docker Build

But this has been done. Why not docker run jekyll/jekyll?

  • I wanted two images, one for easy CLI (bretfisher/jekyll) and one for easy local server for dev with sane defaults (bretfisher/jekyll-serve), which I use 90% of the time
  • So you can start any Jekyll server with docker-compose up
  • I wanted to dev on a local Jekyll site without having Jekyll installed on my host OS
  • I wanted it to be as easy as possible to start
  • I wanted current amd64 and arm64 images using official Ruby and Jekyll latest

So, this does that.

Note I have courses on Docker (including a Lecture on Jekyll in Docker).

‼️ ‼️ ‼️

⚠️ WARNING: ⚠️ This isn't meant to be a production image that you run a web server with. I don't do that with the Jekyll CLI that comes with this image. Jekyll CLI generates a static site that you can run with GitHub Pages, Netlify, or your own NGINX setup. Furthermore, I don't version anything so these images will not run guaranteed versions of Ruby, Jekyll, etc. (which, if you're running a server, should pin all versions usually.)

Docker Images

Image Purpose Example
bretfisher/jekyll Runs Jekyll by default with no options, good for general CLI commands docker run -v $(pwd):/site bretfisher/jekyll new .
bretfisher/jekyll-serve Runs Jekyll serve with sane defaults, good for local Jekyll site dev docker run -p 4000:4000 -v $(pwd):/site bretfisher/jekyll-serve

Getting Started

Creating a site:

cd to empty directory
docker run -v $(pwd):/site bretfisher/jekyll new .

Start a local server with sane defaults listening on port 4000:

cd dir/of/your/jekyll/site
docker run -p 4000:4000 -v $(pwd):/site bretfisher/jekyll-serve

That's it!

Details: it will mount your current path into the containers /site, bundle install before running jekyll serve to , serve it at http://<docker-host>:4000.

To make this even easier, copy docker-compose.yml from this repository to your jekyll site root. Then you'll only need to:

cd dir/of/your/jekyll/site
docker-compose up

Known issues

  1. arm/v7 version (aka armhf) doesn't exist in this repository.
    • Yes, arm/v7 has become too difficult to support.
  2. alpine version doesn't exist in this repository.
    • Yes, not all Jekyll dependencies are built with musl support, so glibc-based images are now the only option (Debian, Ubuntu, etc).
  3. RESOLVED as of Jekyll 4.3 webrick errors during startup.
    • As of April 2021, Ruby 3.0 is out, and Jekyll is still on 4.2 (released 12/2020). Jekyll 4.2 doesn't have webrick listed as a dependency, so we'll have to manually add it to Gemfile for now if you want to use Ruby 3.0. Ruby 3.0 removed this bundled gems so you'll need to add them manually if you use them: sdbm, webrick, net-telnet, xmlrpc. Hopefully Jekyll 4.3 will have webrick listed as a Jekyll dependency (it is fixed in Jekyll master branch) so manually updating Gemfiles won't be needed.

Q&A

Q. What if I want to run other jekyll commands?

just add the jekyll options to the end of the bretfisher/jekyll:

docker run -v $(pwd):/site bretfisher/jekyll doctor

Q. What if I want to build a site with Gemfile dependencies?

As your Jekyll site gets fancier, you'll need to add Jekyll plugins via Ruby's Gemfile and bundle CLI. You'll need to do a bundle install first before building your Jekyll site.

If you were using this repo's image, you could:

docker run -v $(pwd):/site -it --entrypoint bash bretfisher/jekyll

Then run your commands interactively:

bundle install --retry 5 --jobs 20
bundle exec jekyll build

Then your bind-mounted _site will be there on your host, built by Jekyll using your Gemfile Jekyll dependencies that were installed in that container.

If this is something you do often, you'll want to build your own image that already has your Ruby dependencies installed. Then when you run the jekyll build command, it'll have all the Gemfile dependencies it needs.

License

MIT License

Copyright (c) [Bret Fisher [email protected]]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

jekyll-serve's People

Contributors

bretfisher avatar denisbalan avatar dependabot[bot] avatar dsantra92 avatar mikemol avatar nnadeau avatar rockdog avatar spiraltap avatar yb66 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jekyll-serve's Issues

can you release a updated version of jekyll-serve to docker hub?

when using these docker images i noticed that the Jekyll-serve image is far outdated compared to the base Jekyll image which seems to be causing a bundler mismatch when running jekyll-serve.

P.S: you might want to add "" around the pwd variable in the example commands as using it when in a directory with a space will cause issues with the files not being generated when running new.

serve --profile

Hi Bret, I tried to execute that command here:
docker run -v $(pwd):/site bretfisher/jekyll serve --profile

I always receive this error message. Can you tell me if I'm doing anything wrong?

/usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.17.1/lib/bundler/spec_set.rb:91:in `block in materialize': Could not find jekyll-feed-0.11.0 in any of the sources (Bundler::GemNotFound)
from /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.17.1/lib/bundler/spec_set.rb:85:in `map!'
from /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.17.1/lib/bundler/spec_set.rb:85:in `materialize'
from /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.17.1/lib/bundler/definition.rb:170:in `specs'
from /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.17.1/lib/bundler/definition.rb:237:in `specs_for'
from /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.17.1/lib/bundler/definition.rb:226:in `requested_specs'
from /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.17.1/lib/bundler/runtime.rb:108:in `block in definition_method'
from /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.17.1/lib/bundler/runtime.rb:20:in `setup'
from /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.17.1/lib/bundler.rb:107:in `setup'
from /usr/local/bundle/gems/jekyll-3.8.5/lib/jekyll/plugin_manager.rb:50:in `require_from_bundler'
from /usr/local/bundle/gems/jekyll-3.8.5/exe/jekyll:11:in `<top (required)>'
from /usr/local/bundle/bin/jekyll:23:in `load'
from /usr/local/bundle/bin/jekyll:23:in `<main>'

What still works without problem is docker-compose up:
docker run -v $(pwd):/site bretfisher/jekyll-serve

Live reload not working

First of all, thank you so much for creating this container - the main jekyll one kept refusing to build for me with EOF errors, broken pipes, etc.

Building the site works OK with your version but I've found live reload doesn't seem to work.

If I used this compose:

services:                           # Configs for the various services, we just have one
  jekyll:
    image: bretfisher/jekyll-serve     # Image name to pull from Docker Hub
    ports:
      - 4000:4000                   # Map local port 4000 to port 4000 in the container
      - 35729:35729                 # We need to specify another port for the Jekyll 3.70+ live reload feature
    volumes:
      - /mnt/c/Users/ediflyer/Documents/Repositories/oshw-tools:/site           # Mount a volume so the container can access local data in the src directory

Then I get:
image

If I click on the link it doesn't work but if I change to http://localhost:4000 in my browser it works fine. Port 35729 doesn't work but I think that's as expected as live-reload not specified??

However if I use this compose:

services:                           # Configs for the various services, we just have one
  jekyll:
    image: bretfisher/jekyll-serve     # Image name to pull from Docker Hub
    command: jekyll serve --livereload     # Command to run when the container starts
    ports:
      - 4000:4000                   # Map local port 4000 to port 4000 in the container
      - 35729:35729                 # We need to specify another port for the Jekyll 3.70+ live reload feature
    volumes:
      - /mnt/c/Users/ediflyer/Documents/Repositories/oshw-tools:/site           # Mount a volume so the container can access local data in the src directory

I get this:
image

I see it now includes both ports and seems to have switched from 0.0.0.0 to 127.0.0.1 however neither of those then work (in either localhost or 127.0.0.1 variety - I just get no data served:
image

Should I be triggering livereload differently? Is there an issue with the command?

Jekyll Build Command

Maybe a silly question, should I be able to run the "jekyll build" command for PRD builds? I get the following error.

docker run -v $(pwd):/site bretfisher/jekyll build
/usr/local/bundle/gems/bundler-2.4.3/lib/bundler/definition.rb:526:in materialize': Could not find jekyll-4.3.2, minima-2.5.1, jekyll-feed-0.17.0, webrick-1.8.1, jekyll-seo-tag-2.8.0, concurrent-ruby-1.2.0, sass-embedded-1.58.0-aarch64-linux-gnu in locally installed gems (Bundler::GemNotFound) from /usr/local/bundle/gems/bundler-2.4.3/lib/bundler/definition.rb:187:in specs'
from /usr/local/bundle/gems/bundler-2.4.3/lib/bundler/definition.rb:244:in specs_for' from /usr/local/bundle/gems/bundler-2.4.3/lib/bundler/runtime.rb:18:in setup'
from /usr/local/bundle/gems/bundler-2.4.3/lib/bundler.rb:170:in setup' from /usr/local/bundle/gems/jekyll-4.3.1/lib/jekyll/plugin_manager.rb:52:in require_from_bundler'
from /usr/local/bundle/gems/jekyll-4.3.1/exe/jekyll:11:in <top (required)>' from /usr/local/bundle/bin/jekyll:25:in load'
from /usr/local/bundle/bin/jekyll:25:in `

'

Appreciate your work creating this image.

git missing

Hi @BretFisher, thanks for this project - it really saves a lot of trouble with Ruby gems.
When I run docker run -p 4000:4000 -v $(pwd):/site bretfisher/jekyll-serve in the folder of my project, after a long series of fetch/install logs, I get this error message:

Please ensure that your Gemfiles and .gemspecs are suitably restrictive
to avoid an unexpected breakage when 3.0 is released (e.g. ~> 2.3.0).
See https://github.com/rubyzip/rubyzip for details. The Changelog also
lists other enhancements and bugfixes that have been implemented since
version 2.3.0.
Configuration file: /site/_config.yml
To use retry middleware with Faraday v2.0+, install `faraday-retry` gem
            Source: /site
       Destination: /site/_site
 Incremental build: disabled. Enable with --incremental
      Generating...
   GitHub Metadata: No GitHub API authentication could be found. Some fields may be missing or have incorrect data.
  Liquid Exception: No such file or directory - git in /_layouts/default.liquid
/usr/local/bundle/gems/jekyll-github-metadata-2.13.0/lib/jekyll-github-metadata/metadata_drop.rb:90:in ``': No such file or directory - git (Errno::ENOENT)
	from /usr/local/bundle/gems/jekyll-github-metadata-2.13.0/lib/jekyll-github-metadata/metadata_drop.rb:90:in `build_revision'
	from /usr/local/bundle/gems/jekyll-3.9.2/lib/jekyll/drops/drop.rb:52:in `public_send'
	from /usr/local/bundle/gems/jekyll-3.9.2/lib/jekyll/drops/drop.rb:52:in `[]'
	from /usr/local/bundle/gems/liquid-4.0.3/lib/liquid/context.rb:197:in `lookup_and_evaluate'
[...cut long stacktrace...]
jekyll 3.9.2 | Error:  No such file or directory - git

It seems in the liquid template I have some tags that extracts the git revision using git command, but git is not installed, so it fails.
Could you please add git to the image or suggest a workaround?

Don't overwrite host/port information specified in _config

There is no way to use this serve script out of the box without running on a machine where 0.0.0.0:4000 is the desired endpoint.

Though you can of course run this with a custom build line (docker run... bundle exec jekyll serve) it would be nice to support this from scratch!

Both images seem equal

Hi @BretFisher,

I've been trying to use the docker images on my Synology NAS, but every time I start the bretfisher/jekyll I get the following in the console.

NOTE: hmm, I don't see a Gemfile so I don't think there's a jekyll site here
Either you didn't mount a volume, or you mounted it incorrectly.
Be sure you're in your jekyll site root and use something like this to launch

docker run -p 80:4000 -v $(pwd):/site bretfisher/jekyll-serve

NOTE: To create a new site, you can use the sister image bretfisher/jekyll like:

docker run -v $(pwd):/site bretfisher/jekyll new .

I noticed that both images have the same size also.

Do you have any clue?

Regards,

Jochen

question about enable https

hi thanks for the jekyll image it's running great, now i want to enable https for my blog on a vps, so does this jekyll use nginx or webrick as web server? and how to configure to enbale https? thank you very much.

livereload support

I'm not getting live reloading support in the jekyll-serve image. Is that missing or is there a way I can pass the --livereload argument from docker-compose file?

I'm talking about the jekyll serve --livereload command that was introduced in Jekyll 3.7.0

PR81 Breaks builds on Intel Macs

We've been using your image for your Jekyll project, and since 1/13 our Intel Mac users have had issues building. Either the build seems to hang and never completes, or it completes with a lot of warnings after a very extended amount of time. One of my writers ran with --verbose and saw that it was indeed rendering pages, but much, much slower than before. On an M1 Max I had no issues.

I've attached screenshots of top running in the Docker container and most of the warnings that occurred before the build completes:
container top
warnings

Dunno if this is an "us" issue or not. As some background, we're using your image as jekyll/jekyll still has the webrick issue that you took care of. I don't have a lot of Docker knowledge; I inherited this project. Already this year I've had to find a suitable replacement for jekyll/jekyll-minimal as envygeeks images are all AMD64 and we're transitioning to Apple Silicon now. Please let me know if you need anything more from me.

Error when changing template in Gemfile

Sorry to bother.

When trying to change the theme of Jekyll site, by replacing

gem "minima", "~> 2.0"
by
gem "github-pages", group: :jekyll_plugins
and running:
docker run -p 80:4000 --rm -v $(pwd):/site bretfisher/jekyll-serve
I'm getting the have the following output:

The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Fetching gem metadata from https://rubygems.org/.............
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "jekyll":
  In snapshot (Gemfile.lock):
    jekyll (= 3.7.3)

  In Gemfile:
    github-pages was resolved to 4, which depends on
      jekyll (= 1.1.2)

    jekyll-feed (~> 0.6) was resolved to 0.9.3, which depends on
      jekyll (~> 3.3)

Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.

I tried to run the bundle update command in the end of the container run command but it didn't work.

Any help is highly appreciated.

Regards,
Gilson

No backwards compatibility with GH Pages

Hi,

We have been using this image for quite a while now until it suddenly broke down a few days ago. This ultimately has to do with us using this image with Github Pages to serve our website. Upgrading to Ruby 3.0 broke an underlying dependency.

(see this thread for an example: https://talk.jekyllrb.com/t/error-no-implicit-conversion-of-hash-into-integer/5890)

For us it was an easy fix to roll back to Ruby 2.7 (after figuring out what went wrong), but it might be a good idea to add a backward compatible tag on docker hub using Ruby 2.7 for subsequent users running into the same issue.

Cheers,

Rob

Jekyll Fails to Start: Missing webrick

Hi, I'm running through your Docker course and just happened to stumble upon an issue where jekyll doesn't start as it is missing webrick.

There is a note here that it was removed from the 3.0.0 release. I was able to work around it by adding the dependency to the Gemfile manually, but that is not a real fix and I'm not a Ruby guy or a Docker guy (yet) so not sure where this goes?

--blank

I am trying to build jekyll as --blank. Is that even an option with this image?

(question) docker jekyll-serve read _config.yml

Hello,

First of all, sorry if my question is not a problem with your image and it is a jekyll problem that I have to solve on my own.

I use your jekyll-serve image, but I have a question about how it works locally and then upload the result to github.

The question is the following, I have configured the _config.yml -> url with my web address but when executing the image the feed.xml file maintains the following address http://0.0.0.0:4000 and there is no way to change that address (no matter how many changes you make to the configuration file and how many times you reboot the image). It's like it ignores the _config.yml file.

But on the other hand, if I execute from within the image bundle exec jekyll build --watch all the files are regenerated correctly, 0ncluding the feed.xml, but this time with the correct address (the one that I have informed in the url of _config. yml ).

This is where I have the doubt, that it has to be done like this (because of the operation of the image) or is it that the image does not read the configuration file _config.yml when it starts.

Thank you very much for all your work.

Bundler update

Hi Bret,

Are you planning to push an updated image with the lastest or newer bundler release? I use the image for local development and it always creates bundles with version 2.3.22.
But for deployment, I build with Oryx via GitHub Actions and it always first tries to use a more recent version of bundler (2.4.2).

It would be nice if locally it would use a higher version aswel.

Regards,

Jochen

"Could not fetch specs from https://rubygems.org/" error when starting up

Hi Bret,
I'm following your Docker course on Udemy and reached the persistent storage chapter. When running this container, it tries to fetch something from rubygems.org and fails, eventually giving up after 6 retries.

Status: Downloaded newer image for bretfisher/jekyll-serve:latest
Fetching source index from https://rubygems.org/
Retrying fetcher due to error (2/6): Bundler::HTTPError Could not fetch specs from https://rubygems.org/ due to underlying error <SocketError: Failed to open TCP connection to rubygems.org:443 (getaddrinfo: Try again) (https://rubygems.org/specs.4.8.gz)>


Retrying fetcher due to error (3/6): Bundler::HTTPError Could not fetch specs from https://rubygems.org/ due to underlying error <SocketError: Failed to open TCP connection to rubygems.org:443 (getaddrinfo: Try again) (https://rubygems.org/specs.4.8.gz)>

Retrying fetcher due to error (4/6): Bundler::HTTPError Could not fetch specs from https://rubygems.org/ due to underlying error <SocketError: Failed to open TCP connection to rubygems.org:443 (getaddrinfo: Try again) (https://rubygems.org/specs.4.8.gz)>

Retrying fetcher due to error (5/6): Bundler::HTTPError Could not fetch specs from https://rubygems.org/ due to underlying error <SocketError: Failed to open TCP connection to rubygems.org:443 (getaddrinfo: Try again) (https://rubygems.org/specs.4.8.gz)>
Retrying fetcher due to error (6/6): Bundler::HTTPError Could not fetch specs from https://rubygems.org/ due to underlying error <SocketError: Failed to open TCP connection to rubygems.org:443 (getaddrinfo: Try again) (https://rubygems.org/specs.4.8.gz)>


Could not fetch specs from https://rubygems.org/ due to underlying error
<SocketError: Failed to open TCP connection to rubygems.org:443 (getaddrinfo:
Try again) (https://rubygems.org/specs.4.8.gz)>

It looks like something is blocking Ruby to call home, but it's only inside the container.
If I run curl -ivk https://rubygems.org/specs.4.8.gz, it works.
If it matters, I'm on a Mac.

Cheers!
Octav

Why docker-compose and docker run ( help )

Hello.

I am trying to use its container, but I have a couple of doubts when it comes to using it.

  • Why put the "docker-compose" if the next thing you do is a "docker-run" (that's what I see if I check the entrypoint.sh)

  • What is the difference between jekyll and jekyll-server? because in your documentation I don't see any difference.

  • In its details, you explain "it will mount your current path into the containers / site, bundle install before running jekyll serve to, serve it at http: // : 4000". But my question is how are you going to "bundle" the container if it doesn't work until you do a "docker run" (all this using the docker-compose).

Thanks if you can help me

Server address not mapped to 4000 and pointed at 8080 instead

Copying the docker-compose file and running docker-compose up runs successfully and the verbose logs indicate that the site is hosted at locahost:4000. But in reality the site is hosted at localhost:8080.

The build logs for my dockerized webiste:
Recreating explore-ml-iemkgithubio_jekyll_1 ... done
Attaching to explore-ml-iemkgithubio_jekyll_1
jekyll_1  | Fetching gem metadata from https://rubygems.org/
jekyll_1  | Fetching gem metadata from https://rubygems.org/.........
jekyll_1  | Using concurrent-ruby 1.1.9
jekyll_1  | Using public_suffix 4.0.6
jekyll_1  | Using bundler 2.2.23
jekyll_1  | Using colorator 1.1.0
jekyll_1  | Using eventmachine 1.2.7
jekyll_1  | Using http_parser.rb 0.6.0
jekyll_1  | Using ffi 1.15.3
jekyll_1  | Fetching faraday-net_http_persistent 1.2.0
jekyll_1  | Fetching faraday-patron 1.0.0
jekyll_1  | Fetching faraday-rack 1.0.0
jekyll_1  | Fetching multipart-post 2.1.1
jekyll_1  | Using forwardable-extended 2.6.0
jekyll_1  | Fetching gemoji 3.0.1
jekyll_1  | Using rb-fsevent 0.11.0
jekyll_1  | Fetching zeitwerk 2.4.2
jekyll_1  | Fetching execjs 2.8.1
jekyll_1  | Fetching faraday-em_synchrony 1.0.0
jekyll_1  | Fetching faraday-excon 1.1.0
jekyll_1  | Fetching faraday-net_http 1.0.1
jekyll_1  | Fetching minitest 5.14.4
jekyll_1  | Fetching thread_safe 0.3.6
jekyll_1  | Fetching unf_ext 0.0.7.7
jekyll_1  | Fetching faraday-httpclient 1.0.1
jekyll_1  | Fetching ruby2_keywords 0.0.5
jekyll_1  | Fetching coffee-script-source 1.11.1
jekyll_1  | Fetching faraday-em_http 1.0.0
jekyll_1  | Fetching rexml 3.2.5
jekyll_1  | Using liquid 4.0.3
jekyll_1  | Fetching mercenary 0.3.6
jekyll_1  | Using rouge 3.26.0
jekyll_1  | Using safe_yaml 1.0.5
jekyll_1  | Fetching racc 1.5.2
jekyll_1  | Installing faraday-net_http_persistent 1.2.0
jekyll_1  | Fetching jekyll-paginate 1.1.0
jekyll_1  | Installing faraday-patron 1.0.0
jekyll_1  | Installing faraday-net_http 1.0.1
jekyll_1  | Installing faraday-em_synchrony 1.0.0
jekyll_1  | Installing faraday-excon 1.1.0
jekyll_1  | Installing zeitwerk 2.4.2
jekyll_1  | Installing faraday-em_http 1.0.0
jekyll_1  | Installing faraday-httpclient 1.0.1
jekyll_1  | Installing ruby2_keywords 0.0.5
jekyll_1  | Installing faraday-rack 1.0.0
jekyll_1  | Installing execjs 2.8.1
jekyll_1  | Fetching rubyzip 2.3.2
jekyll_1  | Installing multipart-post 2.1.1
jekyll_1  | Installing mercenary 0.3.6
jekyll_1  | Using unicode-display_width 1.7.0
jekyll_1  | Fetching jekyll-swiss 1.0.0
jekyll_1  | Fetching webrick 1.7.0
jekyll_1  | Using addressable 2.8.0
jekyll_1  | Using em-websocket 0.5.2
jekyll_1  | Fetching ethon 0.14.0
jekyll_1  | Using rb-inotify 0.10.1
jekyll_1  | Using pathutil 0.16.2
jekyll_1  | Fetching terminal-table 1.8.0
jekyll_1  | Fetching i18n 0.9.5
jekyll_1  | Fetching sass-listen 4.0.0
jekyll_1  | Fetching listen 3.6.0
jekyll_1  | Installing coffee-script-source 1.11.1
jekyll_1  | Installing minitest 5.14.4
jekyll_1  | Installing gemoji 3.0.1
jekyll_1  | Fetching faraday 1.7.0
jekyll_1  | Fetching coffee-script 2.4.1
jekyll_1  | Installing rexml 3.2.5
jekyll_1  | Using kramdown 2.3.1
jekyll_1  | Using kramdown-parser-gfm 1.1.0
jekyll_1  | Installing thread_safe 0.3.6
jekyll_1  | Fetching tzinfo 1.2.9
jekyll_1  | Installing jekyll-paginate 1.1.0
jekyll_1  | Installing racc 1.5.2 with native extensions
jekyll_1  | Installing sass-listen 4.0.0
jekyll_1  | Installing coffee-script 2.4.1
jekyll_1  | Installing listen 3.6.0
jekyll_1  | Using jekyll-watch 2.2.1
jekyll_1  | Installing webrick 1.7.0
jekyll_1  | Installing rubyzip 2.3.2
jekyll_1  | Installing jekyll-swiss 1.0.0
jekyll_1  | Installing ethon 0.14.0
jekyll_1  | Installing terminal-table 1.8.0
jekyll_1  | Installing faraday 1.7.0
jekyll_1  | Installing i18n 0.9.5
jekyll_1  | Installing unf_ext 0.0.7.7 with native extensions
jekyll_1  | Fetching jekyll-coffeescript 1.1.1
jekyll_1  | Fetching sass 3.7.4
jekyll_1  | Fetching typhoeus 1.4.0
jekyll_1  | Fetching sawyer 0.8.2
jekyll_1  | Fetching ruby-enum 0.9.0
jekyll_1  | Installing tzinfo 1.2.9
jekyll_1  | Installing jekyll-coffeescript 1.1.1
jekyll_1  | Installing sawyer 0.8.2
jekyll_1  | Installing typhoeus 1.4.0
jekyll_1  | Installing ruby-enum 0.9.0
jekyll_1  | Fetching activesupport 6.0.4
jekyll_1  | Fetching octokit 4.21.0
jekyll_1  | Fetching nokogiri 1.12.3 (x86_64-linux)
jekyll_1  | Fetching unf 0.1.4
jekyll_1  | Fetching commonmarker 0.17.13
jekyll_1  | Installing sass 3.7.4
jekyll_1  | Fetching jekyll-sass-converter 1.5.2
jekyll_1  | Installing jekyll-sass-converter 1.5.2
jekyll_1  | Fetching jekyll 3.9.0
jekyll_1  | Installing commonmarker 0.17.13 with native extensions
jekyll_1  | Installing octokit 4.21.0
jekyll_1  | Installing unf 0.1.4
jekyll_1  | Installing jekyll 3.9.0
jekyll_1  | Installing activesupport 6.0.4
jekyll_1  | Fetching jekyll-gist 1.5.0
jekyll_1  | Fetching simpleidn 0.2.1
jekyll_1  | Fetching jekyll-avatar 0.7.0
jekyll_1  | Fetching jekyll-default-layout 0.1.4
jekyll_1  | Fetching jekyll-feed 0.15.1
jekyll_1  | Fetching jekyll-optional-front-matter 0.3.2
jekyll_1  | Fetching jekyll-github-metadata 2.13.0
jekyll_1  | Fetching jekyll-redirect-from 0.16.0
jekyll_1  | Fetching jekyll-readme-index 0.3.0
jekyll_1  | Fetching jekyll-titles-from-headings 0.5.3
jekyll_1  | Fetching jekyll-relative-links 0.6.1
jekyll_1  | Fetching jekyll-seo-tag 2.7.1
jekyll_1  | Fetching jekyll-sitemap 1.4.0
jekyll_1  | Fetching jekyll-remote-theme 0.4.3
jekyll_1  | Fetching jekyll-commonmark 1.3.1
jekyll_1  | Installing jekyll-relative-links 0.6.1
jekyll_1  | Installing jekyll-remote-theme 0.4.3
jekyll_1  | Installing jekyll-default-layout 0.1.4
jekyll_1  | Installing jekyll-titles-from-headings 0.5.3
jekyll_1  | Installing jekyll-feed 0.15.1
jekyll_1  | Installing jekyll-seo-tag 2.7.1
jekyll_1  | Fetching jekyll-theme-architect 0.2.0
jekyll_1  | Fetching jekyll-theme-cayman 0.2.0
jekyll_1  | Fetching jekyll-theme-dinky 0.2.0
jekyll_1  | Fetching jekyll-theme-hacker 0.2.0
jekyll_1  | Fetching jekyll-theme-merlot 0.2.0
jekyll_1  | Fetching jekyll-theme-modernist 0.2.0
jekyll_1  | Fetching jekyll-theme-midnight 0.2.0
jekyll_1  | Fetching jekyll-theme-minimal 0.2.0
jekyll_1  | Fetching jekyll-theme-slate 0.2.0
jekyll_1  | Fetching jekyll-theme-leap-day 0.2.0
jekyll_1  | Installing jekyll-redirect-from 0.16.0
jekyll_1  | Installing simpleidn 0.2.1
jekyll_1  | Fetching jekyll-theme-tactile 0.2.0
jekyll_1  | Fetching jekyll-theme-time-machine 0.2.0
jekyll_1  | Installing jekyll-optional-front-matter 0.3.2
jekyll_1  | Fetching minima 2.5.1
jekyll_1  | Installing jekyll-commonmark 1.3.1
jekyll_1  | Installing jekyll-readme-index 0.3.0
jekyll_1  | Fetching dnsruby 1.61.7
jekyll_1  | Fetching jekyll-commonmark-ghpages 0.1.6
jekyll_1  | Installing jekyll-theme-modernist 0.2.0
jekyll_1  | Installing jekyll-github-metadata 2.13.0
jekyll_1  | Installing jekyll-theme-hacker 0.2.0
jekyll_1  | Installing jekyll-theme-cayman 0.2.0
jekyll_1  | Installing jekyll-theme-dinky 0.2.0
jekyll_1  | Installing minima 2.5.1
jekyll_1  | Installing jekyll-theme-time-machine 0.2.0
jekyll_1  | Fetching jekyll-theme-primer 0.6.0
jekyll_1  | Installing jekyll-theme-slate 0.2.0
jekyll_1  | Installing jekyll-theme-tactile 0.2.0
jekyll_1  | Installing jekyll-theme-architect 0.2.0
jekyll_1  | Installing jekyll-commonmark-ghpages 0.1.6
jekyll_1  | Installing jekyll-theme-minimal 0.2.0
jekyll_1  | Installing jekyll-theme-primer 0.6.0
jekyll_1  | Installing jekyll-theme-leap-day 0.2.0
jekyll_1  | Installing jekyll-avatar 0.7.0
jekyll_1  | Installing jekyll-theme-merlot 0.2.0
jekyll_1  | Installing dnsruby 1.61.7
jekyll_1  | Fetching github-pages-health-check 1.17.2
jekyll_1  | Installing jekyll-gist 1.5.0
jekyll_1  | Installing jekyll-theme-midnight 0.2.0
jekyll_1  | Installing github-pages-health-check 1.17.2
jekyll_1  | Installing jekyll-sitemap 1.4.0
jekyll_1  | Installing nokogiri 1.12.3 (x86_64-linux)
jekyll_1  | Fetching html-pipeline 2.14.0
jekyll_1  | Installing html-pipeline 2.14.0
jekyll_1  | Fetching jekyll-mentions 1.6.0
jekyll_1  | Fetching jemoji 0.12.0
jekyll_1  | Installing jemoji 0.12.0
jekyll_1  | Installing jekyll-mentions 1.6.0
jekyll_1  | Fetching github-pages 218
jekyll_1  | Installing github-pages 218
jekyll_1  | Bundle complete! 2 Gemfile dependencies, 100 gems now installed.
jekyll_1  | Use `bundle info [gemname]` to see where a bundled gem is installed.
jekyll_1  | Post-install message from dnsruby:
jekyll_1  | Installing dnsruby...
jekyll_1  |   For issues and source code: https://github.com/alexdalitz/dnsruby
jekyll_1  |   For general discussion (please tell us how you use dnsruby): https://groups.google.com/forum/#!forum/dnsruby
jekyll_1  | Post-install message from sass:
jekyll_1  | 
jekyll_1  | Ruby Sass has reached end-of-life and should no longer be used.
jekyll_1  | 
jekyll_1  | * If you use Sass as a command-line tool, we recommend using Dart Sass, the new
jekyll_1  |   primary implementation: https://sass-lang.com/install
jekyll_1  | 
jekyll_1  | * If you use Sass as a plug-in for a Ruby web framework, we recommend using the
jekyll_1  |   sassc gem: https://github.com/sass/sassc-ruby#readme
jekyll_1  | 
jekyll_1  | * For more details, please refer to the Sass blog:
jekyll_1  |   https://sass-lang.com/blog/posts/7828841
jekyll_1  | 
jekyll_1  | Post-install message from html-pipeline:
jekyll_1  | -------------------------------------------------
jekyll_1  | Thank you for installing html-pipeline!
jekyll_1  | You must bundle Filter gem dependencies.
jekyll_1  | See html-pipeline README.md for more details.
jekyll_1  | https://github.com/jch/html-pipeline#dependencies
jekyll_1  | -------------------------------------------------
jekyll_1  | Post-install message from rubyzip:
jekyll_1  | RubyZip 3.0 is coming!
jekyll_1  | **********************
jekyll_1  | 
jekyll_1  | The public API of some Rubyzip classes has been modernized to use named
jekyll_1  | parameters for optional arguments. Please check your usage of the
jekyll_1  | following classes:
jekyll_1  |   * `Zip::File`
jekyll_1  |   * `Zip::Entry`
jekyll_1  |   * `Zip::InputStream`
jekyll_1  |   * `Zip::OutputStream`
jekyll_1  | 
jekyll_1  | Please ensure that your Gemfiles and .gemspecs are suitably restrictive
jekyll_1  | to avoid an unexpected breakage when 3.0 is released (e.g. ~> 2.3.0).
jekyll_1  | See https://github.com/rubyzip/rubyzip for details. The Changelog also
jekyll_1  | lists other enhancements and bugfixes that have been implemented since
jekyll_1  | version 2.3.0.
jekyll_1  | Configuration file: /site/_config.yml
jekyll_1  |             Source: /site
jekyll_1  |        Destination: /site/_site
jekyll_1  |  Incremental build: disabled. Enable with --incremental
jekyll_1  |       Generating... 
jekyll_1  |       Remote Theme: Using theme pmarsceill/just-the-docs
jekyll_1  |                     done in 5.508 seconds.
jekyll_1  | /usr/local/bundle/gems/pathutil-0.16.2/lib/pathutil.rb:502: warning: Using the last argument as keyword parameters is deprecated
jekyll_1  |  Auto-regeneration: enabled for '/site'
jekyll_1  |     Server address: http://0.0.0.0:4000/
jekyll_1  |   Server running... press ctrl-c to stop.

docker run fails (ruby version ~> 2.2, which is incompatible with the current version)

Hi

and first of all thank you for your previous docker image which I've used without any issues so far.
Unluckily, I bumped into a weird error: when I do

docker run -p 4000:4000 -v $(pwd):/site bretfisher/jekyll-serve

docker exits with this error:

minitest-5.14.0 requires ruby version ~> 2.2, which is incompatible with the
current version, ruby 3.0.1p64

Any hints? Thanks!!

Livereload not working (my-fault)

So I have tried to get the livereload to develop the site live.
My Dockerfile:

FROM ruby:3.1-slim-bullseye as jekyll

RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential \
    git \
    && rm -rf /var/lib/apt/lists/*

# used in the jekyll-server image, which is FROM this image
COPY docker-entrypoint.sh /usr/local/bin/

RUN gem update --system && gem install jekyll && gem cleanup

EXPOSE 4000
EXPOSE 35729

WORKDIR /site

ENTRYPOINT [ "jekyll" ]

CMD [ "--help" ]

# build from the image we just built with different metadata
FROM jekyll as jekyll-serve
COPY . /site 
RUN bundle install --retry 5 --jobs 20
RUN bundle exec jekyll build

# on every container start, check if Gemfile exists and warn if it's missing
ENTRYPOINT [ "docker-entrypoint.sh" ]

CMD [ "bundle", "exec", "jekyll", "serve","--livereload-min-delay", "10" ,"--open-url","--force_polling", "-H", "0.0.0.0", "-P", "4000" ]

Docker-command with output

[uumami@magi uumami.github.io]$  docker run --rm -it --network host -v /home/uumami/uumami/uumami.github.io/:/app uumami:page
Bundle complete! 6 Gemfile dependencies, 46 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
1 installed gem you directly depend on is looking for funding.
  Run `bundle fund` for details
Configuration file: /site/_config.yml
 Theme Config file: /site/_config.yml
            Source: /site
       Destination: /site/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
                    done in 0.303 seconds.
 Auto-regeneration: enabled for '/site'
LiveReload address: http://0.0.0.0:35729
    Server address: http://0.0.0.0:4000/
  Server running... press ctrl-c to stop.
        LiveReload: Browser connected


I have also tried with the ports manually specified with the same results

[uumami@magi uumami.github.io]$  docker run --rm -it --network host -v /home/uumami/uumami/uumami.github.io/:/app uumami:page

I have tried with the docker compose up

# no version needed since 2020

services:
  jekyll:
    image: uumami:page
    volumes:
      - .:/site
    ports:
      - '4000:4000'
      - '35729:35729'


Where I get this warnings:

ARN[0000] The "UID" variable is not set. Defaulting to a blank string. 
WARN[0000] The "GID" variable is not set. Defaulting to a blank string. 
WARN[0000] The "UID" variable is not set. Defaulting to a blank string.

Probably is not a bug, and I am missing something.

Changing theme seems to break jekyll?

So I run the first docker command to create the site, then edit the _config.yml file to change the theme, then start the docker-compose.yml - but now it breaks.

I am running a lot of other docker containers in my homelab, but never had to run two different as here so I probably don't quite understand how they relate to each other? Help?

Error when running `bretfisher/jekyll --build`

Hi @BretFisher, Thanks for the efforts and this repo it's helped me get a simple Jekyll blog running in no time. I was planning to use the bretfisher/jekyll Docker image in a GitHub Action to process the .md files of my blog into HTML. I am having issues with that but in trying to isolate the issue I found I cannot even call build locally

docker run -v $(pwd):/site bretfisher/jekyll --build I get the following error?

/usr/local/bundle/gems/bundler-2.3.23/lib/bundler/definition.rb:508:in `materialize': Could not find minima-2.5.1, jekyll-feed-0.17.0, jekyll-seo-tag-2.8.0, rexml-3.2.5 in locally installed gems (Bundler::GemNotFound)
	from /usr/local/bundle/gems/bundler-2.3.23/lib/bundler/definition.rb:187:in `specs'
	from /usr/local/bundle/gems/bundler-2.3.23/lib/bundler/definition.rb:244:in `specs_for'
	from /usr/local/bundle/gems/bundler-2.3.23/lib/bundler/runtime.rb:18:in `setup'
	from /usr/local/bundle/gems/bundler-2.3.23/lib/bundler.rb:162:in `setup'
	from /usr/local/bundle/gems/jekyll-4.2.2/lib/jekyll/plugin_manager.rb:52:in `require_from_bundler'
	from /usr/local/bundle/gems/jekyll-4.2.2/exe/jekyll:11:in `<top (required)>'
	from /usr/local/bundle/bin/jekyll:23:in `load'
	from /usr/local/bundle/bin/jekyll:23:in `<main>'

The jekyll-serve image works a-ok, I'm sure I'm missing something simple. Thanks

Errors with jekyll-serve since 2021-04-09's update to Ruby 3.0

Hi, as we were discussing in Twitter, here's a detailed error log about the issue we are facing when trying to bring up our Jekyll site since the last update. As you can see in the logs, the server just tries to re-spawn in an apparent endless loop, showing part of the same error messages as in the first execution.

Log: https://del.dog/ewokithifu.txt
Copy of our Gemfile attached. Gemfile.zip
Copy of the resulting Gemfile.lock attached. Gemfile.lock.zip

Copy of the plugins listed in our _config.yml file: https://del.dog/epelusirul.txt

not working anymore on raspbian

Since last update of image, i cannot start my container:
/usr/local/lib/ruby/2.7.0/rubygems/specification.rb:106:in initialize': Operation not permitted - clock_gettime (Errno::EPERM) from /usr/local/lib/ruby/2.7.0/rubygems/specification.rb:106:in now'
from /usr/local/lib/ruby/2.7.0/rubygems/specification.rb:106:in <class:Specification>' from /usr/local/lib/ruby/2.7.0/rubygems/specification.rb:39:in <top (required)>'
from /usr/local/lib/ruby/2.7.0/rubygems.rb:1417:in require' from /usr/local/lib/ruby/2.7.0/rubygems.rb:1417:in module:Gem'
from /usr/local/lib/ruby/2.7.0/rubygems.rb:115:in <top (required)>' from <internal:gem_prelude>:1:in require'
from internal:gem_prelude:1:in `internal:gem_prelude'
Ist on raspbian

Distributor ID: Raspbian
Description: Raspbian GNU/Linux 10 (buster)
Release: 10
Codename: buster
pi@raspberry-pi4:/DATA/

Do you have an idea to resolve this problem?

`raise_not_found!': Could not find gem 'github-pages' in locally installed gems.

Hello Bret,

Today I tried using your Jekyll image and right after issuing:

docker run -v $(pwd):/site bretfisher/jekyll new .

in an empty folder I am getting the following error (warning?):

/usr/local/lib/ruby/site_ruby/3.1.0/bundler/resolver.rb:304:in `raise_not_found!': Could not find gem 'github-pages' in locally installed gems. (Bundler::GemNotFound)

Since I need to use Github Pages this error is concerning.

Note that I tried it both in Windows 10 and in WSL 2, same error. (In Windows I issued "docker run -v .:/site bretfisher/jekyll new .")

I have little knowledge of Docker, Ruby or Jekyll, is this something that can be (fairly) easy to fix?

TIA for the help mate. Cheers!

Ilias.

A word of praise

I just wanted to thank you. Being on Apple M1 it is not easy to make jekyll work locally, and the dev server from the official Docker image does not work for me either (debugging alpine is a pain). Your image worked perfectly 😗 👌

Do you really need to roll your own entrypoint script?

docker-compose.yaml

volumes:
  - ./site:/srv/jekyll

Dockerfile

WORKDIR $JEKYLL_DATA_DIR

CMD ["sh","-c", "bundle install && bundle exec jekyll serve --host 0.0.0.0 --no-watch -d public"]

Is there anything more to it?

Fails when Nokogiri gem included in website

Hi, I'm using docker run -p 4000:4000 -v $(pwd):/site bretfisher/jekyll-serve to serve this website and I receive the following

Output of cmd:

Fetching gem metadata from https://rubygems.org/.........
Fetching rake 13.0.6
Installing rake 13.0.6
Using public_suffix 4.0.6
Using bundler 2.3.7
Using colorator 1.1.0
Fetching concurrent-ruby 1.1.10
Using eventmachine 1.2.7
Using http_parser.rb 0.8.0
Using ffi 1.15.5
Using forwardable-extended 2.6.0
Fetching gemoji 3.0.1
Using rb-fsevent 0.11.1
Fetching rexml 3.2.5
Using liquid 4.0.3
Using mercenary 0.4.0
Using rouge 3.28.0
Using safe_yaml 1.0.5
Using unicode-display_width 1.8.0
Fetching rubyzip 2.3.2
Fetching racc 1.6.0
Fetching rainbow 3.1.1
Fetching webrick 1.7.0
Using addressable 2.8.0
Using em-websocket 0.5.3
Using sassc 2.4.0
Using rb-inotify 0.10.1
Using pathutil 0.16.2
Using terminal-table 2.0.0
Fetching jekyll-sass-converter 2.2.0
Using listen 3.7.1
Using jekyll-watch 2.2.1
Installing rainbow 3.1.1
Installing jekyll-sass-converter 2.2.0
Installing rubyzip 2.3.2
Installing gemoji 3.0.1
Installing webrick 1.7.0
Installing racc 1.6.0 with native extensions
Installing rexml 3.2.5
Installing concurrent-ruby 1.1.10
Fetching kramdown 2.3.2
Using i18n 1.10.0
Installing kramdown 2.3.2
Using kramdown-parser-gfm 1.1.0
Fetching jekyll 4.2.2
Installing jekyll 4.2.2
Fetching jekyll-pdf-embed 1.1.2.1
Fetching jekyll-remote-theme 0.4.3
Fetching jekyll-seo-tag 2.8.0
Installing jekyll-remote-theme 0.4.3
Installing jekyll-pdf-embed 1.1.2.1
Installing jekyll-seo-tag 2.8.0
Fetching nokogiri 1.13.3 (aarch64-linux)
Fetching just-the-docs 0.3.3
Installing just-the-docs 0.3.3
Installing nokogiri 1.13.3 (aarch64-linux)
Fetching jekyll-spaceship 0.10.2
Installing jekyll-spaceship 0.10.2
Bundle complete! 10 Gemfile dependencies, 40 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
Post-install message from rubyzip:
RubyZip 3.0 is coming!
**********************

The public API of some Rubyzip classes has been modernized to use named
parameters for optional arguments. Please check your usage of the
following classes:
  * `Zip::File`
  * `Zip::Entry`
  * `Zip::InputStream`
  * `Zip::OutputStream`

Please ensure that your Gemfiles and .gemspecs are suitably restrictive
to avoid an unexpected breakage when 3.0 is released (e.g. ~> 2.3.0).
See https://github.com/rubyzip/rubyzip for details. The Changelog also
lists other enhancements and bugfixes that have been implemented since
version 2.3.0.
bundler: failed to load command: jekyll (/usr/local/bundle/bin/jekyll)
/usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/extension.rb:30:in `require': cannot load such file -- nokogiri/nokogiri (LoadError)
	from /usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/extension.rb:30:in `rescue in <top (required)>'
	from /usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/extension.rb:4:in `<top (required)>'
	from /usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri.rb:10:in `require_relative'
	from /usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri.rb:10:in `<top (required)>'
	from /usr/local/bundle/gems/jekyll-spaceship-0.10.2/lib/jekyll-spaceship/cores/manager.rb:3:in `require'
	from /usr/local/bundle/gems/jekyll-spaceship-0.10.2/lib/jekyll-spaceship/cores/manager.rb:3:in `<top (required)>'
	from /usr/local/bundle/gems/jekyll-spaceship-0.10.2/lib/jekyll-spaceship.rb:5:in `require'
	from /usr/local/bundle/gems/jekyll-spaceship-0.10.2/lib/jekyll-spaceship.rb:5:in `<top (required)>'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/runtime.rb:60:in `require'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/runtime.rb:60:in `block (2 levels) in require'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/runtime.rb:55:in `each'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/runtime.rb:55:in `block in require'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/runtime.rb:44:in `each'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/runtime.rb:44:in `require'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler.rb:176:in `require'
	from /usr/local/bundle/gems/jekyll-4.2.2/lib/jekyll/plugin_manager.rb:53:in `require_from_bundler'
	from /usr/local/bundle/gems/jekyll-4.2.2/exe/jekyll:11:in `<top (required)>'
	from /usr/local/bundle/bin/jekyll:23:in `load'
	from /usr/local/bundle/bin/jekyll:23:in `<top (required)>'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/cli/exec.rb:58:in `load'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/cli/exec.rb:58:in `kernel_load'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/cli/exec.rb:23:in `run'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/cli.rb:484:in `exec'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/cli.rb:31:in `dispatch'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/cli.rb:25:in `start'
	from /usr/local/bundle/gems/bundler-2.3.7/exe/bundle:48:in `block in <top (required)>'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
	from /usr/local/bundle/gems/bundler-2.3.7/exe/bundle:36:in `<top (required)>'
	from /usr/local/bundle/bin/bundle:23:in `load'
	from /usr/local/bundle/bin/bundle:23:in `<main>'
/usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/extension.rb:7:in `require_relative': Error loading shared library ld-linux-aarch64.so.1: No such file or directory (needed by /usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/2.7/nokogiri.so) - /usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/2.7/nokogiri.so (LoadError)
	from /usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri/extension.rb:7:in `<top (required)>'
	from /usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri.rb:10:in `require_relative'
	from /usr/local/bundle/gems/nokogiri-1.13.3-aarch64-linux/lib/nokogiri.rb:10:in `<top (required)>'
	from /usr/local/bundle/gems/jekyll-spaceship-0.10.2/lib/jekyll-spaceship/cores/manager.rb:3:in `require'
	from /usr/local/bundle/gems/jekyll-spaceship-0.10.2/lib/jekyll-spaceship/cores/manager.rb:3:in `<top (required)>'
	from /usr/local/bundle/gems/jekyll-spaceship-0.10.2/lib/jekyll-spaceship.rb:5:in `require'
	from /usr/local/bundle/gems/jekyll-spaceship-0.10.2/lib/jekyll-spaceship.rb:5:in `<top (required)>'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/runtime.rb:60:in `require'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/runtime.rb:60:in `block (2 levels) in require'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/runtime.rb:55:in `each'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/runtime.rb:55:in `block in require'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/runtime.rb:44:in `each'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/runtime.rb:44:in `require'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler.rb:176:in `require'
	from /usr/local/bundle/gems/jekyll-4.2.2/lib/jekyll/plugin_manager.rb:53:in `require_from_bundler'
	from /usr/local/bundle/gems/jekyll-4.2.2/exe/jekyll:11:in `<top (required)>'
	from /usr/local/bundle/bin/jekyll:23:in `load'
	from /usr/local/bundle/bin/jekyll:23:in `<top (required)>'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/cli/exec.rb:58:in `load'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/cli/exec.rb:58:in `kernel_load'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/cli/exec.rb:23:in `run'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/cli.rb:484:in `exec'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/cli.rb:31:in `dispatch'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/cli.rb:25:in `start'
	from /usr/local/bundle/gems/bundler-2.3.7/exe/bundle:48:in `block in <top (required)>'
	from /usr/local/bundle/gems/bundler-2.3.7/lib/bundler/friendly_errors.rb:103:in `with_friendly_errors'
	from /usr/local/bundle/gems/bundler-2.3.7/exe/bundle:36:in `<top (required)>'
	from /usr/local/bundle/bin/bundle:23:in `load'
	from /usr/local/bundle/bin/bundle:23:in `<main>'

Also, docker run -v $(pwd):/site bretfisher/jekyll bundle install fails

docker run -v $(pwd):/site bretfisher/jekyll bundle install
/usr/local/bundle/gems/bundler-2.3.9/lib/bundler/definition.rb:481:in `materialize': Could not find jekyll-remote-theme-0.4.3, jekyll-spaceship-0.10.2, jekyll-seo-tag-2.8.0, jekyll-pdf-embed-1.1.2.1, rake-13.0.6, webrick-1.7.0, just-the-docs-0.3.3, kramdown-2.3.2, rubyzip-2.3.2, gemoji-3.0.1, nokogiri-1.13.3-aarch64-linux, rainbow-3.1.1, concurrent-ruby-1.1.10, rexml-3.2.5, racc-1.6.0 in any of the sources (Bundler::GemNotFound)
	from /usr/local/bundle/gems/bundler-2.3.9/lib/bundler/definition.rb:190:in `specs'
	from /usr/local/bundle/gems/bundler-2.3.9/lib/bundler/definition.rb:238:in `specs_for'
	from /usr/local/bundle/gems/bundler-2.3.9/lib/bundler/runtime.rb:18:in `setup'
	from /usr/local/bundle/gems/bundler-2.3.9/lib/bundler.rb:151:in `setup'
	from /usr/local/bundle/gems/jekyll-4.2.2/lib/jekyll/plugin_manager.rb:52:in `require_from_bundler'
	from /usr/local/bundle/gems/jekyll-4.2.2/exe/jekyll:11:in `<top (required)>'
	from /usr/local/bundle/bin/jekyll:23:in `load'
	from /usr/local/bundle/bin/jekyll:23:in `<main>'

Thank you. I like the tool and have used it successfully in other projects.

Fail due to locked jekyll version

I attempted to run the container today on my arch linux system using:

docker container run -p 80:4000 -v $(pwd):/site bretfisher/jekyll-serve

The full output from the command is as follows:

The dependency tzinfo (~> 1.2) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32 java`.
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32 java`.
The dependency wdm (~> 0.1.1) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x64-mingw32, x86-mswin32. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x64-mingw32 x86-mswin32`.
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
You have requested:
  jekyll ~> 4.2.0

The bundle currently has jekyll locked at 3.8.5.
Try running `bundle update jekyll`

If you are updating multiple gems in your Gemfile at once,
try passing them all to `bundle update`

At which point the container immediately exits.

[Question] What other issues did you find with Ruby 3.0?

Hello!

I'm considering swapping to this image from the official image due to it sort of idling out. (e.g. they have STILL not added webrick manually as a dependency).

What other issues have you identified with Ruby 3.0?

Sidebar - how actively maintained is this project?

all posts not being copied over to /_site volume

I have my own jekyll site that I am trying to develop with using the jekyll-serve image. I copied over the docker-compose.yaml

version: '2'

services:
  jekyll:
    build: ./
    volumes:
      - .:/site
    ports:
      - '8080:4000'

I updated the image to be build with my current directory cause I wanted to add a little change to the Dockerfile. Here is the Dockerfile...

FROM bretfisher/jekyll-serve

RUN gem install jekyll-paginate
RUN gem install jekyll-archives

Then I just do docker-compose up to run it. The site seems to be created correctly. I can go to the main page at localhost:8080 but if I try to go to any of the posts it isn't found. and the url looks like this http://0.0.0.0:4000/jekyll/tutorial/2018/01/11/quick-start-guide.html Instead of localhost:8080 it adds the ip and port that is from the inside the container.

I also noticed inside the _site director that gets copied as the volume, that there aren' any of my posts in there. Seems like that is an issue with the volumes.

Is there something I am doing wrong here? Or am I trying to use the image in an incorrect way?

Thanks!

Live reload?

Is there a way I can run this with live reload enabled, so that changes to the files in the directory trigger the site to regenerate?

Run as non-root user in container

For development, the current setup is fine, but it would still be nice for CI purposes to run as a limited user in the container. Since bind-mounts are used, this would need to be tested on macOS, Windows, and Linux to ensure it doesn't break read/write from container to host files.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.