summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Dockerfile37
-rw-r--r--README.md21
-rw-r--r--roles/install-grub/tasks/main.yml2
-rw-r--r--templates/debian.list.j26
4 files changed, 60 insertions, 6 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..c524878
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,37 @@
+FROM debian:11.8
+
+# Install minimal dependencies
+RUN apt-get update && apt-get install -y \
+ ansible \
+ python3
+
+# Install required packages (from ansible role "install-packages")
+RUN apt-get update && apt-get install -y \
+ gdisk \
+ kpartx \
+ dosfstools \
+ e2fsprogs \
+ gnupg \
+ qemu-utils \
+ python3-lxml \
+ grub-efi-amd64 \
+ grub-efi-amd64-bin \
+ grub-common \
+ isolinux \
+ python3-requests \
+ rsync \
+ unzip \
+ zlib1g-dev \
+ squashfs-tools \
+ xorriso
+
+# Install not required dependencies
+RUN apt-get install -y \
+ git \
+ mc \
+ nano \
+ && rm -rf /var/lib/apt/lists/*
+
+# Make build directory
+RUN mkdir -p /home/build
+WORKDIR /home/build
diff --git a/README.md b/README.md
index ce36bc8..26eb7af 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,26 @@ All other requirements will be installed by ansible-playbook.
## Prepare
-You need to copy the ISO image with VyOS to /tmp/vyos.iso before running ansible-playbook. Resulting images also will be located inside /tmp/ directory.
+You need to copy the ISO image with VyOS to `/tmp/vyos.iso` before running ansible-playbook. Resulting images also will be located inside `/tmp/` directory.
+
+### Docker
+The Dockerfile has all required dependencies.
+1. Download the `Dockerfile`
+```
+wget https://raw.githubusercontent.com/vyos/vyos-vm-images/current/Dockerfile
+```
+2. Build local image with name `vyos-vm-images` (only if you do not have it)
+```
+docker build --tag vyos-vm-images:latest -f ./Dockerfile .
+```
+3. Start and connect to the container:
+```shell
+docker run --rm -it --privileged -v $(pwd):/vm-build -v $(pwd)/images:/images -w /vm-build vyos-vm-images:latest bash
+```
+4. Clone repo
+```
+git clone https://github.com/vyos/vyos-vm-images.git && cd vyos-vm-images
+```
## Supported Platforms
diff --git a/roles/install-grub/tasks/main.yml b/roles/install-grub/tasks/main.yml
index 75de819..575dfbf 100644
--- a/roles/install-grub/tasks/main.yml
+++ b/roles/install-grub/tasks/main.yml
@@ -15,8 +15,6 @@
mount --bind /proc {{ vyos_install_root }}/proc &&
mount --bind /sys {{ vyos_install_root }}/sys &&
mount --bind {{ vyos_write_root }} {{ vyos_install_root }}/boot
- args:
- warn: no
- name: Create efi directory
become: true
diff --git a/templates/debian.list.j2 b/templates/debian.list.j2
index b358fa9..79c6bca 100644
--- a/templates/debian.list.j2
+++ b/templates/debian.list.j2
@@ -10,8 +10,8 @@ deb http://deb.debian.org/debian buster-updates main contrib non-free
deb http://security.debian.org/debian-security/ buster/updates main contrib non-free
deb http://dev.packages.vyos.net/repositories/equuleus equuleus main
{% else %}
-deb http://deb.debian.org/debian bullseye main contrib non-free
-deb http://deb.debian.org/debian bullseye-updates main contrib non-free
-deb http://deb.debian.org/debian-security/ bullseye-security main contrib non-free
+deb http://deb.debian.org/debian bookworm main contrib non-free
+deb http://deb.debian.org/debian bookworm-updates main contrib non-free
+deb http://deb.debian.org/debian-security/ bookworm-security main contrib non-free
deb http://dev.packages.vyos.net/repositories/current current main
{% endif %}