{"id":17062903,"url":"https://github.com/bretfisher/jekyll-serve","last_synced_at":"2025-04-05T11:09:51.586Z","repository":{"id":38272351,"uuid":"83963001","full_name":"BretFisher/jekyll-serve","owner":"BretFisher","description":"Jekyll in a Docker Container For Easy SSG Development","archived":false,"fork":false,"pushed_at":"2023-03-07T07:06:15.000Z","size":87,"stargazers_count":351,"open_issues_count":5,"forks_count":122,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-03-28T04:33:14.975Z","etag":null,"topics":["docker","docker-compose","docker-image","jekyll","static-site-generator"],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BretFisher.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"custom":"bretfisher.com/members"}},"created_at":"2017-03-05T10:48:57.000Z","updated_at":"2025-03-16T17:04:52.000Z","dependencies_parsed_at":"2025-02-02T15:10:38.993Z","dependency_job_id":"1698619e-e0a8-4b0d-81c3-9f91f4992a70","html_url":"https://github.com/BretFisher/jekyll-serve","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BretFisher%2Fjekyll-serve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BretFisher%2Fjekyll-serve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BretFisher%2Fjekyll-serve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BretFisher%2Fjekyll-serve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BretFisher","download_url":"https://codeload.github.com/BretFisher/jekyll-serve/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247325693,"owners_count":20920714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","docker-image","jekyll","static-site-generator"],"created_at":"2024-10-14T10:51:02.134Z","updated_at":"2025-04-05T11:09:51.571Z","avatar_url":"https://github.com/BretFisher.png","language":"Dockerfile","funding_links":["bretfisher.com/members"],"categories":[],"sub_categories":[],"readme":"# Jekyll in a Docker Container\n\n[![GitHub Super-Linter](https://github.com/bretfisher/jekyll-serve/workflows/Lint%20Code%20Base/badge.svg)](https://github.com/marketplace/actions/super-linter)\n[![Docker Build](https://github.com/BretFisher/jekyll-serve/actions/workflows/call-docker-build.yaml/badge.svg)](https://github.com/BretFisher/jekyll-serve/actions/workflows/call-docker-build.yaml)\n\n\u003e But this has been done. Why not `docker run jekyll/jekyll`?\n\n- I wanted two images, one for easy CLI (`bretfisher/jekyll`) and one for\neasy local server for dev with sane defaults (`bretfisher/jekyll-serve`), which I use 90% of the time\n- So you can start any Jekyll server with `docker-compose up`\n- I wanted to dev on a local Jekyll site without having Jekyll installed on my host OS\n- I wanted it to be as easy as possible to start\n- I wanted current `amd64` and `arm64` images using official Ruby and Jekyll latest\n\n\u003e So, this does that.\n\nNote [I have courses on Docker (including a Lecture on Jekyll in Docker)](https://www.bretfisher.com/courses).\n\n:bangbang: :bangbang: :bangbang:\n\n:warning: WARNING: :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\nCLI that comes with this image. Jekyll CLI generates\na static site that you can run with GitHub Pages, Netlify, or your own NGINX setup.  Furthermore, I don't version\nanything so these images will not run guaranteed versions of Ruby, Jekyll, etc. (which, if you're running a server,\nshould pin all versions usually.)\n\n## Docker Images\n\n| Image | Purpose | Example |\n| ----- | ------- | ------- |\n| [bretfisher/jekyll](https://hub.docker.com/r/bretfisher/jekyll/) | Runs Jekyll by default with no options, good for general CLI commands | `docker run -v $(pwd):/site bretfisher/jekyll new .` |\n| [bretfisher/jekyll-serve](https://hub.docker.com/r/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` |\n\n## Getting Started\n\nCreating a site:\n\n```shell\ncd to empty directory\ndocker run -v $(pwd):/site bretfisher/jekyll new .\n```\n\nStart a local server with sane defaults listening on port 4000:\n\n```shell\ncd dir/of/your/jekyll/site\ndocker run -p 4000:4000 -v $(pwd):/site bretfisher/jekyll-serve\n```\n\nThat's it!\n\nDetails: it will mount your current path into the containers `/site`, `bundle install` before running\n`jekyll serve` to , serve it at `http://\u003cdocker-host\u003e:4000`.\n\nTo make this even easier, copy `docker-compose.yml`\n[from this repository](https://github.com/BretFisher/jekyll-serve/blob/master/docker-compose.yml)\nto your jekyll site root. Then you'll only need to:\n\n```shell\ncd dir/of/your/jekyll/site\ndocker-compose up\n```\n\n## Known issues\n\n1. `arm/v7` version (aka `armhf`) doesn't exist in this repository.\n    - Yes, `arm/v7` has become too difficult to support.\n2. `alpine` version doesn't exist in this repository.\n    - Yes, not all Jekyll dependencies are built with `musl` support, so `glibc`-based images are now the only option (Debian, Ubuntu, etc).\n3. RESOLVED as of Jekyll 4.3\n    ~~`webrick` errors during startup.~~\n    - ~~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.~~\n    ~~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.~~\n\n## Q\u0026A\n\n### Q. What if I want to run other jekyll commands?\n\njust add the jekyll options to the end of the `bretfisher/jekyll`:\n\n```shell\ndocker run -v $(pwd):/site bretfisher/jekyll doctor\n```\n\n### Q. What if I want to build a site with Gemfile dependencies?\n\nAs 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.\n\nIf you were using this repo's image, you could:\n\n`docker run -v $(pwd):/site -it --entrypoint bash bretfisher/jekyll`\n\nThen run your commands interactively:\n\n```bash\nbundle install --retry 5 --jobs 20\nbundle exec jekyll build\n```\n\nThen your bind-mounted `_site` will be there on your host, built by Jekyll using your Gemfile Jekyll dependencies that were installed in that container.\n\nIf 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.\n\n## License\n\nMIT License\n\nCopyright (c) [Bret Fisher bret@bretfisher.com]\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbretfisher%2Fjekyll-serve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbretfisher%2Fjekyll-serve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbretfisher%2Fjekyll-serve/lists"}