Recently, my old Windows machine where this jekyll blog was installed is getting very slow. It took ages to start up the editor and start blogging. So I decided to install this old jekyll blog on the kinda’ new Mac I have. However, it took some time, figuring-out ( you know rbv, ruby, bundler, etc.), tinkering to install jekyll and eventually get started. I read a lot of tutorial blogs and it turned-out that there are different ways to start and run jekyll on Mac. I just don’t want to deal with this installation mess. All I really want is to quickly start-up my blog locally on any machines or OS (Mac, PC, Ubuntu, etc.), write a content and upload it to my server. And then go back to my other important tasks!
Consequently, I decided to use Docker so in the future I’ll not spend a lot of time reinstalling my blog on another machine. We are using Docker at work and I’m a big fan of it. I’m also using it on one of my personal project. If you happened to visit pxstuff.com, you are hitting an Express and Angular Docker containers. Obviously, it’s a great tool on standardizing the software you’re building to run across different platforms. If you haven’t used Docker before, I highly recommend that you learn and use it. It’s a great Return Of Investment on your time as a developer. Their website is a great learning resource. Here’s a nice blog for the top 10 advantages of using Docker, https://apiumhub.com/tech-blog-barcelona/top-benefits-using-docker/.
I also want to use Nginx to serve my jekyll blog ( a lot use Github page - https://help.github.com/articles/setting-up-your-github-pages-site-locally-with-jekyll/ ). I prefer to roll with Nginx since I’m more familiar with it and I have more control on customization if need be.
Thankfully, jekyll have their own official docker image - https://hub.docker.com/r/jekyll/jekyll/. Using jekyll and nginx official docker images, I ended up wiring a reusable Docker template.
It’s publicly available on Github - https://github.com/hunyoboy/dockerized-jekyll-nginx.
Feel free to use it. Just clone the repo and follow the instructions on Readme! I made an effort to write a clear and concise readme. Or you can leave a comment/feedback below if you have some issues and concerns about it.
Thank you for reading :)