Add Dockerized workflow

Squashed commit of the following:

commit 7c043fea5e7fe2aa431af325f0148d1005c1154e
Author: shane <shane@distrust.co>
Date:   Tue Jan 24 10:06:23 2023 -0600

    Change capitalization of makefile to Makefile

commit 47c85805d9c28b98063fa87dbff746f5e2fad703
Author: shane <shane@distrust.co>
Date:   Tue Jan 24 09:55:23 2023 -0600

    Re-remove shell scripts to be run by Makefile

    `$PWD`, it turns out, does not resolve in Makefiles. Perhaps this is because it is not strictly running `bash` from a `source`d shell environment. When instead computing the value with `$(shell pwd)`, the volume mounts are successful and the operations perform as-expected.

commit dc5952bef488010d4dd9e7b44c688a4033b5f0b2
Author: shane <shane@distrust.co>
Date:   Tue Jan 24 09:42:06 2023 -0600

    Re-add shell scripts to run from Makefile

    If the Makefile executes the same commands, they do not effectively do the right thing. The files for the _site directory do not get created and the server only resolves to an empty site directory. Nothing was changed about the commands. This just seems to be something about `make`'s permissions.

commit 2c98664076c071082d3a1807b40a322a8ecab174
Author: shane <shane@distrust.co>
Date:   Tue Jan 24 09:00:39 2023 -0600

    Remove redundancies from Makefile process

    - Move contents of build.sh to `build:` target
    - Move contents of serve.sh to `serve:` target

commit 09d9964453425245025560e46a5b25e1c8d3c746
Author: shane <shane@distrust.co>
Date:   Tue Jan 24 08:59:15 2023 -0600

    Re-add Gemfile.lock

    - This one was produced with the most recent Gemfile version

commit 13768779681292b48a3a23a65824bca466be1611
Author: shane <shane@distrust.co>
Date:   Mon Jan 23 21:22:42 2023 -0600

    Add Dockerized workflow
This commit is contained in:
Shane Engelman 2023-01-24 14:51:59 -06:00
parent 99f3324570
commit 97fc5437f0
Signed by: shane
GPG Key ID: D9DF703B83B9A9B5
6 changed files with 60 additions and 63 deletions

1
.gitignore vendored
View File

@ -3,5 +3,4 @@ _site
.jekyll-cache .jekyll-cache
.jekyll-metadata .jekyll-metadata
vendor vendor
.DS_Store .DS_Store

12
Dockerfile Normal file
View File

@ -0,0 +1,12 @@
FROM jekyll/minimal:3.8
RUN apk update && apk add g++ make
RUN mkdir -p /home
COPY Gemfile /home
COPY Gemfile.lock /home
RUN chmod -R 777 /home
WORKDIR /home
RUN bundle install
CMD ["jekyll", "serve"]

31
Gemfile
View File

@ -1,30 +1,5 @@
source "https://rubygems.org" source "https://rubygems.org"
# Hello! This is where you manage which Jekyll version is used to run. gem "jekyll", "~> 3.8"
# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
# bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 4.1.1"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.5"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
# gem "github-pages", group: :jekyll_plugins
# If you have any plugins, put them here!
# group :jekyll_plugins do
# gem "jekyll-feed", "~> 0.12"
# end
# Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem
# and associated library.
# platforms :mingw, :x64_mingw, :mswin, :jruby do
# gem "tzinfo", "~> 1.2"
# gem "tzinfo-data"
# end
# Performance-booster for watching directories on Windows
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
gem "jekyll-theme-console" gem "jekyll-theme-console"
gem "sassc", "~> 2.1.0"
gem "kramdown-parser-gfm"

View File

@ -4,7 +4,7 @@ GEM
addressable (2.8.1) addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0) public_suffix (>= 2.0.2, < 6.0)
colorator (1.1.0) colorator (1.1.0)
concurrent-ruby (1.1.10) concurrent-ruby (1.2.0)
em-websocket (0.5.3) em-websocket (0.5.3)
eventmachine (>= 0.12.9) eventmachine (>= 0.12.9)
http_parser.rb (~> 0) http_parser.rb (~> 0)
@ -12,27 +12,23 @@ GEM
ffi (1.15.5) ffi (1.15.5)
forwardable-extended (2.6.0) forwardable-extended (2.6.0)
http_parser.rb (0.8.0) http_parser.rb (0.8.0)
i18n (1.12.0) i18n (0.9.5)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
jekyll (4.1.1) jekyll (3.9.2)
addressable (~> 2.4) addressable (~> 2.4)
colorator (~> 1.0) colorator (~> 1.0)
em-websocket (~> 0.5) em-websocket (~> 0.5)
i18n (~> 1.0) i18n (~> 0.7)
jekyll-sass-converter (~> 2.0) jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 2.0) jekyll-watch (~> 2.0)
kramdown (~> 2.1) kramdown (>= 1.17, < 3)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0) liquid (~> 4.0)
mercenary (~> 0.4.0) mercenary (~> 0.3.3)
pathutil (~> 0.9) pathutil (~> 0.9)
rouge (~> 3.0) rouge (>= 1.7, < 4)
safe_yaml (~> 1.0) safe_yaml (~> 1.0)
terminal-table (~> 1.8) jekyll-sass-converter (1.5.2)
jekyll-feed (0.17.0) sass (~> 3.4)
jekyll (>= 3.7, < 5.0)
jekyll-sass-converter (2.2.0)
sassc (> 2.0.1, < 3.0)
jekyll-seo-tag (2.8.0) jekyll-seo-tag (2.8.0)
jekyll (>= 3.8, < 5.0) jekyll (>= 3.8, < 5.0)
jekyll-theme-console (0.4.0) jekyll-theme-console (0.4.0)
@ -48,11 +44,7 @@ GEM
listen (3.8.0) listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3) rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10) rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0) mercenary (0.3.6)
minima (2.5.1)
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
pathutil (0.16.2) pathutil (0.16.2)
forwardable-extended (~> 2.6) forwardable-extended (~> 2.6)
public_suffix (5.0.1) public_suffix (5.0.1)
@ -62,23 +54,22 @@ GEM
rexml (3.2.5) rexml (3.2.5)
rouge (3.30.0) rouge (3.30.0)
safe_yaml (1.0.5) safe_yaml (1.0.5)
sassc (2.4.0) sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sassc (2.1.0)
ffi (~> 1.9) ffi (~> 1.9)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
unicode-display_width (1.8.0)
PLATFORMS PLATFORMS
ruby ruby
DEPENDENCIES DEPENDENCIES
jekyll (~> 4.1.1) jekyll (~> 3.8)
jekyll-feed (~> 0.12)
jekyll-theme-console jekyll-theme-console
minima (~> 2.5) kramdown-parser-gfm
tzinfo (~> 1.2) sassc (~> 2.1.0)
tzinfo-data
wdm (~> 0.1.1)
BUNDLED WITH BUNDLED WITH
2.1.4 2.1.4

17
Makefile Normal file
View File

@ -0,0 +1,17 @@
.PHONY: build
build:
# Build Docker image
docker build -t distrust-co .
# Export site to _site directory
docker run -v $(shell pwd):/home -it distrust-co jekyll build
.PHONY: serve
serve:
# Run Docker container with listener for current dir and port mapping
docker run -v $(shell pwd):/home -p 0.0.0.0:4000:4000 -it distrust-co
.PHONY: clean
clean:
# Remove _site directory
rm -rf _site

View File

@ -4,10 +4,13 @@ Web page source.
## Instructions ## Instructions
1. Install [Ruby](https://www.ruby-lang.org/en/documentation/installation/) 1. Install `make`.
2. Install [Jekyll](https://jekyllrb.com/docs/installation/) 2. Install `docker`
3. 3. Build (export) site to `_site` directory:
```shell ```shell
$ jekyll build $ make build
```
4. Serve site at `0.0.0.0:4000`:
```shell
$ make serve
``` ```
4. Extract contents from `_site` directory.