Docker: When you spin the jekyll on the docker,

Asked 1 years ago, Updated 1 years ago, 82 views

Hello.

I want to distribute the blog by spinning Jekyll on the docker. I erased Ruby just now If Ruby is not local and only dockers, image files, and blog source files are needed, can the development server be turned around and the build is finished, so can we distribute it at runtime?

If there is anything lacking in my question, please leave a comment. Thank you.

jekyll docker

2022-09-22 16:57

1 Answers

Docker recommends taking the time to learn. Once you're used to dockers, it's easier to build a development and testing environment.

First, you can receive the jekyll through the following route.

https://hub.docker.com/r/jekyll/jekyll

You can create a container with the command below.

The --volume option is called a data volume, which is the path of the host.

This means that the host directory is accessible from the container. Data disappears when the container is shut down, so data such as the source code that changes using the data volume is managed separately.

export JEKYLL_VERSION=3.8
docker run --rm \
  --volume="$PWD:/srv/jekyll" \
  -it jekyll/jekyll:$JEKYLL_VERSION \
  jekyll build


2022-09-22 16:57

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.