diff --git a/lib/tasks/danbooru.rake b/lib/tasks/danbooru.rake new file mode 100644 index 000000000..0cc9fc11c --- /dev/null +++ b/lib/tasks/danbooru.rake @@ -0,0 +1,10 @@ +namespace :danbooru do + namespace :docker do + # Note that uncommited changes won't be included in the image; commit + # changes first before building the image. + desc "Build a Docker image based on latest commit" + task :build do + system("git archive HEAD | docker build - --build-arg SOURCE_COMMIT=$(git rev-parse HEAD) -t danbooru -f Dockerfile") + end + end +end