-
Notifications
You must be signed in to change notification settings - Fork 7
/
Makefile
50 lines (39 loc) · 1.21 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
NAME=centos7
build:
@docker build -t cobbler .
run:
@docker run \
-d \
--privileged \
--net host \
-v /sys/fs/cgroup:/sys/fs/cgroup:ro \
-v $(shell pwd)/etc/cobbler/settings:/etc/cobbler/settings \
-v $(shell pwd)/etc/cobbler/dhcp.template:/etc/cobbler/dhcp.template \
-v $(shell pwd)/dist/mnt:/mnt:ro \
-v $(shell pwd)/var/www/cobbler/images:/var/www/cobbler/images \
-v $(shell pwd)/var/www/cobbler/ks_mirror:/var/www/cobbler/ks_mirror \
-v $(shell pwd)/var/www/cobbler/links:/var/www/cobbler/links \
-v $(shell pwd)/var/lib/cobbler/config:/var/lib/cobbler/config \
-v $(shell pwd)/var/lib/tftpboot:/var/lib/tftpboot \
-p 69:69 \
-p 80:80 \
-p 443:443 \
-p 25151:25151 \
--name cobbler cobbler
clean:
@docker rm cobbler > /dev/null || true
mount:
mkdir -p dist/mnt/$(NAME) && sudo mount -t iso9660 -o loop,ro -v $(shell pwd)/dist/$(NAME).iso dist/mnt/$(NAME)
umount:
sudo umount dist/mnt/$(NAME)
tty:
@docker exec -it cobbler /bin/bash
stop:
@docker stop cobbler
start:
@docker start cobbler
import:
@docker exec -it cobbler cobbler import --name=$(NAME) --arch=x86_64 --path=/mnt/$(NAME)
all: build mount run import
vbox:
vboxmanage hostonlyif ipconfig vboxnet0 --ip 192.168.56.1