Replies: 3 comments 2 replies
-
Could you try adding
Then you run this command once:
The gems will be installed in a folder named Now you should be able to serve your site locally by:
|
Beta Was this translation helpful? Give feedback.
-
Your project depends on more than the listed plugins (I got error while doing quick check). So, I used the
Delete |
Beta Was this translation helpful? Give feedback.
-
I think, those are secondary dependencies. You can inspect source "https://rubygems.org"
gem "jekyll", "~> 3.9"
group :jekyll_plugins do
gem "jekyll-paginate"
gem "jekyll-seo-tag"
gem "jekyll-sitemap"
gem "jemoji"
gem "kramdown-parser-gfm"
end However, it will still update the minor versions. This will happen every time you run docker. I would suggest, you commit the changes to jekyll image locally. In order to do that remove docker run -ti -v ${PWD}:/srv/jekyll jekyll/jekyll:3.8 bundle install Find the last running container id: docker ps -l Or if you are running multiple containers simultaneously, list them all and identify which is jekyll: docker ps -a Container id will look like: docker commit fc0e52 jekyll/jekyll:3.8 Alternatively, you can apply new tag: docker commit fc0e52 jekyll/jekyll:updated Cleanup all stopped containers (optional): docker container prune Now, in your docker compose directly pass: |
Beta Was this translation helpful? Give feedback.
-
I'm trying to run my GitHub Page which is using Jekyll locally on my Windows machine (code of my page).
The Jekyll config
_config.yml
references the following plugins:I follow the official manual from here and created the following
docker-compose.yml
:As you can see, at first I have to manually install all dependencies (which are specified in the
plugins
section of_config.yml
).When reducing the
command
tojekyll serve
(as described in the docs), the following error occurs:The docs also mention the command
bundle update
, but this gives me:What bothers me with my current "solution" is that I have to specify the dependencies/plugins twice, both in
docker-compose.yml
and_config.yml
.Is it possible to get rid of this redundancy and make the Jekyll Docker image restore the necessary gems automatically when using
jekyll serve
and using_config.yml
?Thanks and have a great weekend!
PS: I've also placed this question on Stack Overflow last weekend, unfortunately no answers yet.
Beta Was this translation helpful? Give feedback.
All reactions