summaryrefslogtreecommitdiff
path: root/bin/make-docker
blob: 9a1a1561f251c3f2ca81865b0dbb38c312b1ba9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#! /usr/bin/env perl6

use v6.c;

#| Create a docker image of the blog.
sub MAIN (
	#| The tag to use for the docker image.
	Str:D :$tag = "tyil/blog:latest",
) {
	my IO::Path $basedir = $*PROGRAM.resolve.parent(2);
	chdir $basedir;

	run « bundle »;
	run « bundle exec jekyll build »;
	run « docker build -t "$tag" . »;
}