-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
49 lines (33 loc) · 978 Bytes
/
Makefile
File metadata and controls
49 lines (33 loc) · 978 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
.PHONY: docker-build docker-shell print-build-args \
default \
print-docker-hub-image
SHELL=bash
default:
echo pass
######
# docker stuff
REPO=adstewart
IMAGE_NAME=cits5501-java-gitpod
IMAGE_VERSION=0.1.0
print-image-name:
@echo $(IMAGE_NAME)
print-image-version:
@echo $(IMAGE_VERSION)
GIT_REF=$(shell git rev-parse HEAD)
GIT_COMMIT_DATE=$(shell git show -s --format=%cI $(GIT_REF))
GIT_TAGS=$(shell git tag -l)
print-build-args:
@printf '%s %s\n' '--build-arg GIT_REF=$(GIT_REF)' \
'--build-arg GIT_COMMIT_DATE=$(GIT_COMMIT_DATE)' \
'--build-arg VERSION=$(IMAGE_VERSION)'
print-docker-hub-image:
@printf '%s' "$(REPO)/$(IMAGE_NAME)"
docker-build:
docker build \
-f Dockerfile $(TAGS_TO_ADD) $(TAGS_IN) \
-t $(REPO)/$(IMAGE_NAME):$(IMAGE_VERSION) .
docker-shell:
docker -D run -e DISPLAY -it --rm --net=host \
-v $$PWD:/work --workdir=/work \
$(MOUNT) $(DEVICES) --env QT_X11_NO_MITSHM=1 \
$(REPO)/$(IMAGE_NAME):$(IMAGE_VERSION) bash