Skip to content

Instantly share code, notes, and snippets.

@tgvaughan
Created January 18, 2018 15:45
Show Gist options
  • Save tgvaughan/b59ed136e4d4f23d69267cce865481ac to your computer and use it in GitHub Desktop.
Save tgvaughan/b59ed136e4d4f23d69267cce865481ac to your computer and use it in GitHub Desktop.
Dockerfile for building the TTB website
FROM debian:latest
RUN apt-get update
# Essential build environment
RUN apt-get install -y build-essential git
# Install ruby and bundler
RUN apt-get install -y ruby ruby-dev
RUN gem install bundler
# Install LaTeX
RUN apt-get install -y texlive
RUN apt-get install -y texlive-latex-extra
RUN apt-get install -y biber
# Configure locale (strange things happen otherwise)
ENV LC_ALL "C.UTF-8"
ENV LANG "C.UTF-8"
WORKDIR /ttb
# Construct script for building site
RUN cat <<EOF >/ttb/build_script.sh
#!/bin/bash
cd /ttb
rm -rf blotter
git clone --depth 1 https://github.com/taming-the-beast/blotter.git
cd /ttb/blotter
bundle install
ruby _scripts/update-and-preprocess.rb
if bundle exec jekyll build; then
rm -rf /ttb/site
cp -R /ttb/blotter/_site /ttb/site
fi
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment