Skip to content

Commit

Permalink
add dockerfile to build website
Browse files Browse the repository at this point in the history
  • Loading branch information
westonbelk committed Mar 26, 2024
1 parent 466c9cf commit 666448b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 8 deletions.
12 changes: 4 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,8 @@ submodules: update-submodules
update-submodules:
git submodule update --init --remote --recursive

# Running locally
#
# git clone ssh://[email protected]/github/pages-gem
# cd pages-gem/
# make image

run:
docker run --rm -it -v $(shell pwd):/src/site -p4000:4000 gh-pages sh -c "bundle add webrick && bundle install && jekyll serve -H 0.0.0.0 -P 4000"

#
# cd homepage/ (this repository)
# docker run --rm -it -v .:/src/site -p4000:4000 --security-opt label=disable gh-pages
#
25 changes: 25 additions & 0 deletions __build/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
ARG RUBY_VERSION=3.3
FROM ruby:$RUBY_VERSION

RUN apt-get update \
&& apt-get install -y \
git \
locales \
make \
nodejs

COPY Gemfile Gemfile
RUN bundle install

RUN \
echo "en_US UTF-8" > /etc/locale.gen && \
locale-gen en-US.UTF-8

ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
ENV LC_ALL en_US.UTF-8

WORKDIR /src/site


CMD ["jekyll", "serve", "-H", "0.0.0.0", "-P", "4000"]
3 changes: 3 additions & 0 deletions __build/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source "https://rubygems.org"

gem "github-pages", group: :jekyll_plugins

0 comments on commit 666448b

Please sign in to comment.