aboutsummaryrefslogtreecommitdiff
blob: b91cb4c2009d6df1731521d51fbfc9812d4206fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
set -e
IMAGE_NAME=docker.gentoo.org/sites/www
IMAGE_TAG=latest
IMAGE=${IMAGE_NAME}:${IMAGE_TAG}
IMAGE_SRC=docker/
# Always refresh the image
# Docker caches it anyway
docker build \
	--quiet \
	-t "${IMAGE}" \
	"${IMAGE_SRC}"
# Run the actual build process, with no networking permitted
docker run \
	--rm \
	--net=none \
	-e JEKYLL_UID=$(id -u) \
	-e JEKYLL_GID=$(id -g) \
	--volume="${PWD}:/srv/jekyll" \
	--volume="${PWD}/.bundle:/usr/local/bundle/" \
	"${IMAGE}" \
	jekyll build