github.com/grpc-ecosystem/grpc-gateway/v2@v2.19.1/docs/run.sh (about) 1 #! /bin/bash 2 3 set -e 4 5 JEKYLL_VERSION=4 6 BUNDLE_DIR="/tmp/grpc-gateway-bundle" 7 8 if [ ! -d "${BUNDLE_DIR}" ]; then 9 mkdir "${BUNDLE_DIR}" 10 11 # Run this to update the Gemsfile.lock 12 docker run --rm \ 13 --volume="${PWD}:/srv/jekyll" \ 14 -e "JEKYLL_UID=$(id -u)" \ 15 -e "JEKYLL_GID=$(id -g)" \ 16 --volume="/tmp/grpc-gateway-bundle:/usr/local/bundle" \ 17 -it "jekyll/builder:${JEKYLL_VERSION}" \ 18 bundle update 19 fi 20 21 if [[ ${JEKYLL_GITHUB_TOKEN} == "" ]]; then 22 echo "Please set \$JEKYLL_GITHUB_TOKEN before running" 23 exit 1 24 fi 25 26 docker run --rm \ 27 --volume="${PWD}:/srv/jekyll" \ 28 -p 35729:35729 -p 4000:4000 \ 29 -e "JEKYLL_UID=$(id -u)" \ 30 -e "JEKYLL_GID=$(id -g)" \ 31 -e "JEKYLL_GITHUB_TOKEN=${JEKYLL_GITHUB_TOKEN}" \ 32 --volume="/tmp/grpc-gateway-bundle:/usr/local/bundle" \ 33 -it "jekyll/builder:${JEKYLL_VERSION}" \ 34 jekyll serve