Skip to content

Commit a78f3ef

Browse files
committed
chore: Add rule for building base image locally
1 parent eb2afa2 commit a78f3ef

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
.DEFAULT: help
33

44
tag="fmriprep"
5+
BASE_IMAGE := $(shell grep BASE_IMAGE= Dockerfile | cut -d= -f2)
56

67
help:
78
@echo "Premade recipes"
@@ -10,8 +11,11 @@ help:
1011
@echo "\tBuilds a docker image from source. Defaults to 'fmriprep' tag."
1112

1213

13-
docker-build:
14+
docker-build: docker-base
1415
docker build --rm -t $(tag) \
1516
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
1617
--build-arg VCS_REF=`git rev-parse --short HEAD` \
1718
--build-arg VERSION=`hatch version` .
19+
20+
docker-base:
21+
docker pull $(BASE_IMAGE) || docker build -t $(BASE_IMAGE) -f Dockerfile.base .

0 commit comments

Comments
 (0)