forked from ITISFoundation/osparc-simcore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
29 lines (22 loc) · 798 Bytes
/
Makefile
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
# Minimal makefile to confortably build tool
#
# REFERENCE: https://itnext.io/docker-makefile-x-ops-sharing-infra-as-code-parts-ea6fa0d22946
#
# If you see pwd_unknown showing up, this is why. Re-calibrate your system.
PWD ?= pwd_unknown
# PROJECT_NAME defaults to name of the current directory.
# should not to be changed if you follow GitOps operating procedures.
PROJECT_NAME = $(notdir $(PWD))
.PHONY: build clean prune
all: build
build:
# builds tool's image
@docker buildx build --load --tag ${PROJECT_NAME} .
clean:
# remove created images
@docker image rm -f $(PROJECT_NAME):latest 2>/dev/null \
&& echo 'Image(s) for "$(PROJECT_NAME)" removed.' \
|| echo 'Image(s) for "$(PROJECT_NAME)" already removed.'
prune:
# clean all that is not actively used
docker system prune -af