mmistakes / minimal-mistakes

:triangular_ruler: Jekyll theme for building a personal site, blog, project documentation, or portfolio.
https://mmistakes.github.io/minimal-mistakes/
MIT License
12.3k stars 25.44k forks source link

Just built a Docker image for the theme #4108

Open vaibhav-kaushal opened 1 year ago

vaibhav-kaushal commented 1 year ago

Motivation

I do not see any docker image for the theme built. Since I use the theme at multiple places and have inspired my friends to do so as well. But setting up the theme is not easy, at least not for non-Ruby developers. Non-technical users have no clue what I talk about when I talk about the theme anyway.

To make life easy for everyone (though primarily for me), I created the Docker image. I hope it helps everyone!

Suggestion

Please, please review the Docker image at Docker Hub. Link to docker repository: https://hub.docker.com/r/vaibhavkaushal/mmistakes

The corresponding GitHub repository containing the Dockerfile and Gemfile is here: https://github.com/techrail/mmistakes-docker

Suggestions are welcome, contributions are more than welcome. Many many thanks to @mmistakes for making this theme.

asarkar commented 3 weeks ago

I run the site locally using Docker Compose without the need for maintaining any custom image. Following is my docker-compose.yml.

services:
  blogs:
    image: "jvconseil/jekyll-docker:4"
    container_name: blogs
    working_dir: /srv/jekyll
    command: ["sh","-c", "bundle install && bundle update && bundle exec jekyll serve --host 0.0.0.0 --force_polling --incremental --drafts --trace -d public"]
    ports:
      - "4000:4000"
    volumes:
      - ../site:/srv/jekyll
    logging:
      driver: "json-file"
      options:
        max-size: "1m"
        max-file: "5"
    restart: always
    healthcheck:
      test: ["CMD", "nc", "-z", "localhost", "4000"]
      interval: 30s
      timeout: 5s
      retries: 3

Unfortunately, the official Jekyll Docker Hub images are no longer updated, so, I used a fork, which seems to work fine.