-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
54 lines (41 loc) · 1.65 KB
/
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
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
RELEASE = 2.0.0
.PHONY: usage build podman-build remove podman-remove run podman-run copy podman-copy all podman-all default
usage:
@echo "Please execute with one of the following options:"
@echo " make build : Build a Docker container image using the Dockerfile"
@echo " make podman-build : Build a Podman container image using the Dockerfile"
@echo " make run : Run a Docker container to build the COEN ISO image"
@echo " make podman-run : Run a Podman container to build the COEN ISO image"
@echo " make remove : Remove the Docker container"
@echo " make podman-remove : Remove the Podman container"
@echo " make copy : Copy the resultant COEN ISO image from the Docker container into the host directory"
@echo " make podman-copy : Copy the resultant COEN ISO image from the Podman container into the host directory"
@echo " make all : Execute build, remove, run, and copy with Docker"
@echo " make podman-all : Execute build, remove, run, and copy with Podman"
build:
docker build -t coen:$(RELEASE) .
podman-build:
podman build -t coen:$(RELEASE) .
remove:
-docker rm coen
podman-remove:
-podman rm coen
run:
docker run --init --interactive --tty \
--privileged \
--userns=host --ipc=host --network=host --pid=host --uts=host \
--name=coen \
coen:$(RELEASE)
podman-run:
podman run --interactive --tty \
--privileged \
--userns=host --ipc=host --network=host --pid=host --uts=host \
--name=coen \
coen:$(RELEASE)
copy:
-docker cp coen:/opt/coen-${RELEASE}-amd64.iso .
podman-copy:
-podman cp coen:/opt/coen-${RELEASE}-amd64.iso .
all: build remove run copy
podman-all: podman-build podman-remove podman-run podman-copy
default: usage