I’d like to work on a jekyll blog locally but on a server that does not have internet connection. I work on a docker container and the docker image is already pulled but I’d like to build the blog up when I want (and sometimes my server doesn’t have an internet connection)
The fetching of the ruby gems are thus impossible.
Is their anyone that have a solution to that issue ?
Is is possible to fetch all the gems once (when my server is connected to internet) and then just serve the blog when the container is started (and make it work even if the server doesn’t have internet) ?
are you fetching the gems every time you run jekyll? are you using bundler?
could you build the image with jekyll already installed? wouldn’t that then have all the gems on the server?
I’m pretty sure if I disconnected my computer with jekyll installed it would still run no problem.
I don’t use bundler as I don’t use anything special so maybe that is why I don’t think I would have an issue. Also I am not very knowledgeable about docker so I may not quite understand what you are doing.
Also, if the site is already built you could just use a webserver to serve the site folder rather than using jekyll.
Hi rdyar !
Yes i’m fetching the gem every time because my docker container doesn’t contain them in the first place. Thanks for the reply but I actually found a solution to my problem.
When I want to stop the jekyll server I was removing the entire container therefore I needed to start the container again and fetch all the gems.
So when I create the container, I do it with an internet connection to fetch the gems then when I stop using the jekyll server I use the command “docker stop …” and when I want to start using the jekyll server again I start the container with “docker start …” instead of “docker run …”. Because the container is not removed.
Sorry for the noobie question as It may not be Jekyll related.
Hope that helps someone anyway