Skip to content

Instantly share code, notes, and snippets.

@pmarinova
Last active July 19, 2024 12:00
Show Gist options
  • Save pmarinova/0b345a2656abe079c322ad0a90a32c61 to your computer and use it in GitHub Desktop.
Save pmarinova/0b345a2656abe079c322ad0a90a32c61 to your computer and use it in GitHub Desktop.
Build a docker image for running a github pages site locally.
FROM ruby:3.3
COPY Gemfile .
RUN bundle install
WORKDIR /src/site
CMD ["jekyll", "serve", "-H", "0.0.0.0", "-P", "4000"]
FROM ruby:3.3-alpine
RUN apk update && apk add --no-cache make build-base
COPY Gemfile .
RUN bundle install
WORKDIR /src/site
CMD ["jekyll", "serve", "-H", "0.0.0.0", "-P", "4000"]
source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins
gem 'webrick', '~> 1.8'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment