1
0
mirror of https://github.com/chai2010/advanced-go-programming-book.git synced 2025-05-24 20:52:22 +00:00
2018-07-08 17:52:33 +08:00

29 lines
683 B
Bash
Executable File

#! /bin/bash
set -e
JEKYLL_VERSION=3.5
BUNDLE_DIR="/tmp/grpc-gateway-bundle"
if [ ! -d "${BUNDLE_DIR}" ]; then
mkdir "${BUNDLE_DIR}"
# Run this to update the Gemsfile.lock
docker run --rm \
--volume="${PWD}:/srv/jekyll" \
-e "JEKYLL_UID=$(id -u)" \
-e "JEKYLL_GID=$(id -g)" \
--volume="/tmp/grpc-gateway-bundle:/usr/local/bundle" \
-it "jekyll/builder:${JEKYLL_VERSION}" \
bundle update
fi
docker run --rm \
--volume="${PWD}:/srv/jekyll" \
-p 35729:35729 -p 4000:4000 \
-e "JEKYLL_UID=$(id -u)" \
-e "JEKYLL_GID=$(id -g)" \
--volume="/tmp/grpc-gateway-bundle:/usr/local/bundle" \
-it "jekyll/builder:${JEKYLL_VERSION}" \
jekyll serve