在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:envygeeks/jekyll-docker开源软件地址:https://github.com/envygeeks/jekyll-docker开源编程语言:Shell 61.4%开源软件介绍:Jekyll DockerJekyll 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 Image Types
StandardThe standard images ( Usageexport JEKYLL_VERSION=3.8
docker run --rm \
--volume="$PWD:/srv/jekyll:Z" \
-it jekyll/jekyll:$JEKYLL_VERSION \
jekyll build Quick start under Windows (cmd)set site_name=my-blog
docker run --rm --volume="%CD%:/srv/jekyll" -it jekyll/jekyll sh -c "chown -R jekyll /usr/gem/ && jekyll new %site_name%" && cd %site_name% Quick start under Linux / Git BashIf you are under linux skip export site_name="my-blog" && export MSYS_NO_PATHCONV=1
docker run --rm \
--volume="$PWD:/srv/jekyll" \
-it jekyll/jekyll \
sh -c "chown -R jekyll /usr/gem/ && jekyll new $site_name" \
&& cd $site_name BuilderThe builder image comes with extra stuff that is not included in the standard image, like Usageexport JEKYLL_VERSION=3.8
docker run --rm \
--volume="$PWD:/srv/jekyll:Z" \
-it jekyll/builder:$JEKYLL_VERSION \
jekyll build MinimalThe 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. UsageYou will need to provide a export JEKYLL_VERSION=3.8
docker run --rm \
--volume="$PWD:/srv/jekyll:Z" \
-it jekyll/minimal:$JEKYLL_VERSION \
jekyll build Rootless ContainersIf you are using a rootless container management system, you can set the podman run -ti --rm -v .:/srv/jekyll -e JEKYLL_ROOTLESS=1 docker.io/jekyll/jekyll jekyll new . ServerFor 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. Usagedocker run --rm \
--volume="$PWD:/srv/jekyll:Z" \
--publish [::1]:4000:4000 \
jekyll/jekyll \
jekyll serve DependenciesJekyll Docker will attempt to install any dependencies that you list inside of your UpdatingIf you provide a export JEKYLL_VERSION=3.8
docker run --rm \
--volume="$PWD:/srv/jekyll:Z" \
-it jekyll/jekyll:$JEKYLL_VERSION \
bundle update CachingYou can enable caching in Jekyll Docker by using a My Gems Aren't CachingIf 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 Usageexport JEKYLL_VERSION=3.8
docker run --rm \
--volume="$PWD:/srv/jekyll:Z" \
--volume="$PWD/vendor/bundle:/usr/local/bundle:Z" \
-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 ConfigurationYou 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.
If you would like to know the CLI options for Jekyll, you can visit Jekyll's Help Site PackagesYou can install system packages by providing a file named Buildingscript/build |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论