-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
25 lines (20 loc) · 1.2 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
init:
echo "Installing prerequisites on $(shell hostname)"
sudo apt update && apt install -y apt-transport-https ca-certificates curl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker.gpg
@echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/debian $$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
@sudo apt update && sudo apt install -y docker-ce docker-ce-cli docker-compose containerd.io
@sudo systemctl start docker && systemctl enable docker
install-containerlab:
bash -c "$$(curl -sL https://get.containerlab.dev)"
build-kali:
cd kalilinux && sudo docker build -t kalilinux:latest .
build-arista:
$(info cEOS file: $(wildcard ../cEOS-lab-*.tar.xz))
sudo docker import $(wildcard ../cEOS-lab-*.tar.xz) ceosimage:$(shell echo $(wildcard ../cEOS-lab-*.tar.xz) | sed 's/^.*-//;s/\.tar\.xz//')
build-lab:
cd /home/antoine/mykalilabdev/kalilinux-lab && containerlab deploy
map-lab:
cd /home/antoine/mykalilabdev/kalilinux-lab && containerlab graph -t kali-arista.clab.yml
destroy:
cd /home/antoine/mykalilabdev/kalilinux-lab && containerlab destroy