-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathMakefile
More file actions
19 lines (16 loc) · 925 Bytes
/
Makefile
File metadata and controls
19 lines (16 loc) · 925 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
USER_ID=`id -u`
GROUP_ID=`id -g`
GIT_COMMIT=`git rev-parse HEAD`
.PHONY: build-islandora-workbench
# This command will build a new image for the current git revision, if none exists
build-islandora-workbench:
(docker image ls | grep $(GIT_COMMIT)) || $(MAKE) rebuild-islandora-workbench
.PHONY: rebuild-islandora-workbench
# This command will force build a new image for the current git revision, regardless of whether one exists
rebuild-islandora-workbench:
docker build --build-arg USER_ID=$(USER_ID) --build-arg GROUP_ID=$(GROUP_ID) -t "workbench-docker-$(GIT_COMMIT)" .
.PHONY: run-workbench-in-docker
# This command will bring up the container and drop you into a shell.
# The current working directory will be mounted at /workbench inside the container.
run-workbench-in-docker: build-islandora-workbench
docker run -it --rm --network="host" -v $$(pwd):/workbench -v --name "workbench-docker-$(GIT_COMMIT)" bash