#!/usr/bin/env bash set -x
declare _scripts_dir _scripts_dir=“$( cd ”$( dirname “${BASH_SOURCE}” )“ && pwd )”
# build Docker image docker build -t grey-energy-theme:1.0 “$_scripts_dir”
# run Jekyll in the container docker run \
-w /root/theme \ -v "$_scripts_dir/..:/root/theme" \ -it -p "${1:-4000}:${1:-4000}" \ grey-energy-theme:1.0 \ bash -c \ "bundle install && bundle exec jekyll serve -H 0.0.0.0 -P ${1:-4000}"