-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
61 lines (45 loc) · 1.23 KB
/
Makefile
File metadata and controls
61 lines (45 loc) · 1.23 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Optional arguments
WORKSPACE ?= $(shell pwd)/workspace
# Internal settings
NAME := docker-yed
CTL := $(NAME).sh
# Targets
all: docker
test: docker-test podman-test
list: docker-list podman-list
docker: docker-build docker-run
docker-build:
@echo "Building container (using Docker) ..."
@./$(CTL) -b -w $(WORKSPACE)
docker-run:
@echo "Running container (using Docker) ..."
@./$(CTL) -r -w $(WORKSPACE)
docker-list:
@echo "Docker images:"
@docker images | grep $(NAME)
docker-clean:
docker image rm $(NAME)
docker-test:
@echo "Executing dry run ($(CTL)) (using Docker) ..."
bash -n $(CTL) -b -w $(WORKSPACE)
bash -n $(CTL) -r -w $(WORKSPACE)
@echo "Building container ..."
./$(CTL) -b -w $(WORKSPACE)
podman: podman-build podman-run
podman-build:
@echo "Building container (using Podman) ..."
@./$(CTL) -b -p -w $(WORKSPACE)
podman-run:
@echo "Running container (using Podman) ..."
@./$(CTL) -r -p -w $(WORKSPACE)
podman-list:
@echo "Podman images:"
@podman images | grep $(NAME)
podman-clean:
podman rmi $(NAME)
podman-test:
@echo "Executing dry run ($(CTL)) (using Podman) ..."
bash -n $(CTL) -b -p -w $(WORKSPACE)
bash -n $(CTL) -r -p -w $(WORKSPACE)
@echo "Building container ..."
./$(CTL) -b -p -w $(WORKSPACE)