summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Dockerfile37
-rw-r--r--README.md21
2 files changed, 57 insertions, 1 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 ad2b98c..251ff48 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