Jekyll Docker is a software image that has Jekyll and many of its dependencies ready to use for you in an encapsulated format. It includes a default set of gems, different image types with different extra packages, and wrappers to make Jekyll run more smoothly from start to finish for most Jekyll users. If you would like to know more about Docker you can visit https://docker.com, and if you would like to know more about Jekyll, you can visit https://github.com/jekyll/jekyll
jekyll/jekyll
: Default image.jekyll/minimal
: Very minimal image.jekyll/builder
: Includes tools.The standard images (jekyll/jekyll
) include a default set of "dev" packages, along with Node.js, and other stuff that makes Jekyll easy. It also includes a bunch of default gems that the community wishes us to maintain on the image.
export JEKYLL_VERSION=3.8
docker run --rm \
--volume="$PWD:/srv/jekyll" \
-it jekyll/jekyll:$JEKYLL_VERSION \
jekyll build
The builder image comes with extra stuff that is not included in the standard image, like lftp
, openssh
and other extra packages meant to be used by people who are deploying their Jekyll builds to another server with a CI.
export JEKYLL_VERSION=3.8
docker run --rm \
--volume="$PWD:/srv/jekyll" \
-it jekyll/builder:$JEKYLL_VERSION \
jekyll build
The minimal image skips all the extra gems, all the extra dev dependencies and leaves a very small image to download. This is intended for people who do not need anything extra but Jekyll.
You will need to provide a .apk
file if you intend to use anything like Nokogiri or otherwise, we do not install any development headers or dependencies so C based gems will fail to install.
export JEKYLL_VERSION=3.8
docker run --rm \
--volume="$PWD:/srv/jekyll" \
-it jekyll/minimal:$JEKYLL_VERSION \
jekyll build
For local development, Jekyll can be run in server mode inside the container. It will watch for changes, rebuild the site, and provide access through its included web server. You can then check the results of changes by reloading http://localhost:4000/ in a browser.
docker run --rm \
--volume="$PWD:/srv/jekyll" \
--publish [::1]:4000:4000 \
jekyll/jekyll \
jekyll serve
Jekyll Docker will attempt to install any dependencies that you list inside of your Gemfile
, matching the versions you have in your Gemfile.lock
, including Jekyll if you have a version that does not match the version of the image you are using (you should be doing gem "jekyll", "~> 3.8"
so that minor versions are installed if you use say image tag "3.7.3").
If you provide a Gemfile
and would like to update your Gemfile.lock
you can run
export JEKYLL_VERSION=3.8
docker run --rm \
--volume="$PWD:/srv/jekyll" \
-it jekyll/jekyll:$JEKYLL_VERSION \
bundle update
You can enable caching in Jekyll Docker by using a docker --volume
that points to /usr/local/bundle
inside of the image. This is ideal for users who run builds on CI's and wish them to be fast.
If you do not diverge from the default set of gems we provide (read: add Gems to your Gemfile that aren't already on the image), then bundler by default will not create duplicates, and cache. It will simply rely on what is already installed in $GEM_HOME
. This is the default (observed... but unconfirmed) behavior of bundle
when using $GEM_HOME
w/ $BUNDLE_HOME
export JEKYLL_VERSION=3.8
docker run --rm \
--volume="$PWD:/srv/jekyll" \
--volume="$PWD/vendor/bundle:/usr/local/bundle" \
-it jekyll/jekyll:$JEKYLL_VERSION \
jekyll build
The root of the cache volume (in this case vendor) must also be excluded from the Jekyll build via the _config.yml
exclude array setting.
You can configure some pieces of Jekyll using environment variables, what you cannot with environment variables you can configure using the Jekyll CLI. Even with a wrapper, we pass all arguments onto Jekyll when we finally call it.
ENV Var | Default |
---|---|
JEKYLL_UID |
1000 |
JEKYLL_GID |
1000 |
JEKYLL_DEBUG , |
"" |
VERBOSE |
"" |
FORCE_POLLING |
"" |
If you would like to know the CLI options for Jekyll, you can visit Jekyll's Help Site
You can install system packages by providing a file named .apk
with one package per line. If you need to find out what the package names are for a given command you wish to use you can visit https://pkgs.alpinelinux.org. We provide many dependencies for most Ruby stuff by default for builder
and standard images. This includes ruby-dev
, xml
, xslt
, git
and other stuff that most Ruby packages might need.
script/build
说明 jekyll运行依赖ruby,每次重装都会遇到版本问题,挺麻烦,干脆做成镜像 官方镜像存在的问题 docker上有jekyll的官方镜像,如果是直接运行,没什么问题。 如果你挂载volume就会有权限问题 jekyll 3.8.5 | Error: Permission denied @ dir_s_mkdir - /srv/jekyll/_site 制作步骤 步骤1:修改镜像入口文件e
使用Jeky11框架自定义网站,主要流程如下: 1 构建Jekyll Dockerfile和镜像 mkdir jekyll cd jekyll vi Dockerfile,内容如下: FROM ubuntu:14.04 MAINTAINER mazhen "mz@example.com" ENV REFRESHED_AT 2014-06-01 RUN apt-get -yqq update RUN
使用docsify预览项目 Jekyll 之前是用的jekyll,但是没找到我想要的全局搜索功能,有兴趣的还是可以看下:Jekyll建站 mkdocs 其实Jekyll已经省去了很多麻烦了,但是我真的真的很烦每个md开头要写一大段乱七八糟的配置,不方便迁移,所以就转到mkdocs了,虽然模板的页面效果没有Jekyll丰富,但是对懒人还是极其友好的。 本来想用mkdocs的,毕竟还是挺省事儿的,文件
Linux下安装docker 1、下载脚本 curl -fsSL https://get.docker.com -o get-docker.sh 2、安装docker sudo sh get-docker.sh 3、启动docker服务 sudo service docker start 4、外部访问容器端口 docker run -d -p 3000:4000 knik/jekyll-te
提供两种制作jekyll镜像的方式及最终的镜像文件 方式一,进入容器中制作镜像 拉取ubuntu18.04镜像:docker pull ubuntu:18.04 运行并进入容器:docker run -it --rm --name ubuntu_base ubuntu:18.04 /bin/sh 安装相关依赖 apt-get update apt-get upgrade apt-get insta
“记录本站搭建全过程,为想要自己搭建博客的朋友提供一个参考” 在我的博客网站中查看本文 前言与准备 Docker Docker是一个很方便的跨平台应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的镜像中,然后发布到任何流行的Linux或Windows机器上。Docker中各个容器质检各自是一个“沙箱”,彼此隔离,但其也提供了丰富的容器之间互联的方式使得各个容器质检能够既保持独立,又能
dockerimages �� Some Dockerfiles based on Alpine Linux Dockerfiles plex-ldap An LDAP server that uses Plex as the provider Based on Alpine Linux Automatic installation using environment variables NGIN
Jekyll 是一个简单的免费的Blog生成工具,类似WordPress。但是和WordPress又有很大的不同,原因是jekyll只是一个生成静态网页的工具,不需要数据库支持。但是可以配合第三方服务,例如discuz。最关键的是jekyll可以免费部署在Github上,而且可以绑定自己的域名。 快速安装指令: gem install jekylljekyll new my-awesome-sit
中文网站 jekyllcn 快速开始 ~ $ gem install jekyll bundler ~ $ jekyll new my-awesome-site ~ $ cd my-awesome-site ~/my-awesome-site $ bundle install ~/my-awesome-site $ bundle exec jekyll serve # => 打开浏览器 http
jekyll-admin 是一个 jekyll 插件,为用户提供了传统 CMS(内容管理系统)风格的图形化界面来创作内容和管理 jekyll 网站。 该项目分为两部分。基于 Ruby 的 HTTP API 处理 jekyll 和文件系统的操作部分,以及在这个 API 基础上的基于 JavaScript 的前端部分。 安装: 就像安装其他插件一样,请参阅 jekyll 文档的插件安装部分安装 jek
Jekyll的增强版,使用Markdown来写日志。 Jekyll采用静态文件方式管理,不需要数据库即可支持一个独立博客站点,在github-pages平台上被普遍采用。Jekyll-Bootstrap在Jekyll基础上,集成了twitter-bootstrap界面风格和一些实用的插件,并且易于扩展。
jekyll-katex This is a Jekyll plugin for performing compile-time math rendering via the KaTeX library.KaTeX is a library for rending math on the web using LaTeX, similar to MathJax. KaTeX differs from