Skip to content

Commit d1ef99c

Browse files
author
bamurtaugh
committed
Add container
1 parent 16e433c commit d1ef99c

35 files changed

+2504
-2391
lines changed

.devcontainer/Dockerfile

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# [Choice] Debian OS version (use bullseye on local arm64/Apple Silicon): bullseye, buster
2+
ARG VARIANT=bullseye
3+
FROM mcr.microsoft.com/vscode/devcontainers/jekyll:0-${VARIANT}
4+
5+
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
6+
ARG NODE_VERSION="none"
7+
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
8+
9+
# [Optional] Uncomment this section to install additional OS packages.
10+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
11+
# && apt-get -y install --no-install-recommends <your-package-list-here>
12+
13+
# [Optional] Uncomment this line to install global node packages.
14+
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1

.devcontainer/base.Dockerfile

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# [Choice] Debian OS version (use 2.7-bullseye on local arm64/Apple Silicon): 2.7-bullseye, 2.7-buster
2+
ARG VARIANT=2.7-bullseye
3+
FROM mcr.microsoft.com/vscode/devcontainers/ruby:${VARIANT}
4+
COPY library-scripts/meta.env /usr/local/etc/vscode-dev-containers
5+
6+
# ENV Variables required by Jekyll
7+
ENV LANG=en_US.UTF-8 \
8+
LANGUAGE=en_US:en \
9+
TZ=Etc/UTC \
10+
LC_ALL=en_US.UTF-8 \
11+
LANG=en_US.UTF-8 \
12+
LANGUAGE=en_US
13+
14+
# Install bundler, latest jekyll, and github-pages for older jekyll
15+
RUN gem install bundler jekyll github-pages
16+
17+
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
18+
ARG NODE_VERSION="none"
19+
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
20+
21+
# [Optional] Uncomment this section to install additional OS packages.
22+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
23+
# && apt-get -y install --no-install-recommends <your-package-list-here>
24+
25+
# [Optional] Uncomment this line to install global node packages.
26+
# RUN su vscode -c "source /usr/local/share/nvm/nvm.sh && npm install -g <your-package-here>" 2>&1

.devcontainer/devcontainer.json

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.231.6/containers/jekyll
3+
{
4+
"name": "Jekyll",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
"args": {
8+
// Update 'VARIANT' to pick a Debian OS version: bullseye, buster
9+
// Use bullseye when on local arm64/Apple Silicon.
10+
"VARIANT": "bullseye",
11+
// Enable Node.js: pick the latest LTS version
12+
"NODE_VERSION": "lts/*"
13+
}
14+
},
15+
16+
// Set *default* container specific settings.json values on container create.
17+
"settings": {},
18+
19+
// Add the IDs of extensions you want installed when the container is created.
20+
"extensions": [],
21+
22+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
23+
"forwardPorts": [
24+
// Jekyll server
25+
4000,
26+
// Live reload server
27+
35729
28+
],
29+
30+
// Use 'postCreateCommand' to run commands after the container is created.
31+
"postCreateCommand": "sh .devcontainer/post-create.sh",
32+
33+
// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
34+
"remoteUser": "vscode"
35+
}

.devcontainer/post-create.sh

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
3+
# Install the version of Bundler.
4+
if [ -f Gemfile.lock ] && grep "BUNDLED WITH" Gemfile.lock > /dev/null; then
5+
cat Gemfile.lock | tail -n 2 | grep -C2 "BUNDLED WITH" | tail -n 1 | xargs gem install bundler -v
6+
fi
7+
8+
# If there's a Gemfile, then run `bundle install`
9+
# It's assumed that the Gemfile will install Jekyll too
10+
if [ -f Gemfile ]; then
11+
bundle install
12+
fi

.gitignore

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
npm-debug.log
2-
_site
3-
spec-generator/node_modules
1+
npm-debug.log
2+
_site
3+
spec-generator/node_modules
44
spec-generator/out

.vscode/launch.json

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
{
2-
"version": "0.2.0",
3-
"configurations": [
4-
{
5-
"type": "node",
6-
"request": "launch",
7-
"name": "Generate specification.md",
8-
"program": "${workspaceRoot}/spec-generator/generator.ts",
9-
"outFiles": [ "${workspaceRoot}/spec-generator/out/**/*.js" ]
10-
}
11-
]
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"type": "node",
6+
"request": "launch",
7+
"name": "Generate specification.md",
8+
"program": "${workspaceRoot}/spec-generator/generator.ts",
9+
"outFiles": [ "${workspaceRoot}/spec-generator/out/**/*.js" ]
10+
}
11+
]
1212
}

.vscode/tasks.json

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "Serve",
8+
"type": "shell",
9+
"command": "bundle exec jekyll serve --livereload",
10+
"group": {
11+
"kind": "test",
12+
"isDefault": true
13+
},
14+
"isBackground": true,
15+
},
16+
{
17+
"label": "Build",
18+
"type": "shell",
19+
"command": "bundle exec jekyll build",
20+
"group": {
21+
"kind": "build",
22+
"isDefault": true
23+
},
24+
}
25+
]
26+
}

404.html

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
---
2-
layout: default
3-
---
4-
5-
<div class="container text-center">
6-
<p>The page you are looking for cannot be found.</p>
7-
<h2>404</h2>
1+
---
2+
layout: default
3+
---
4+
5+
<div class="container text-center">
6+
<p>The page you are looking for cannot be found.</p>
7+
<h2>404</h2>
88
</div>

Gemfile

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
source "https://rubygems.org"
2-
ruby RUBY_VERSION
3-
4-
gem "jekyll", "3.6.2"
5-
6-
# to use GitHub Pages
7-
# gem "github-pages", group: :jekyll_plugins
8-
9-
# If you have any plugins, put them here!
10-
group :jekyll_plugins do
11-
gem "jemoji"
12-
gem "github-pages"
13-
gem "jekyll-remote-theme"
14-
end
15-
16-
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
1+
source "https://rubygems.org"
2+
ruby RUBY_VERSION
3+
4+
gem "jekyll", "3.6.2"
5+
6+
# to use GitHub Pages
7+
# gem "github-pages", group: :jekyll_plugins
8+
9+
# If you have any plugins, put them here!
10+
group :jekyll_plugins do
11+
gem "jemoji"
12+
gem "github-pages"
13+
gem "jekyll-remote-theme"
14+
end
15+
16+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
1717
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

0 commit comments

Comments
 (0)