Skip to content

Commit 7153bd3

Browse files
authored
Merge pull request #713 from roy-hopkins/roy-hopkins/cvm-image-builder
Add CvmImageBuilder - Confidential Virtual Machine vhdx build script
2 parents dda2506 + 2c65927 commit 7153bd3

19 files changed

Lines changed: 2627 additions & 0 deletions
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
build/
2+
rootfs/
3+
*.vhdx
4+
*.raw
5+
*.img
6+
*.squashfs
7+
*.hash
8+
*.log
9+
.git/
10+
.gitignore
11+
README.md
12+
*.md
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#
2+
# Copyright (c) Microsoft Corporation. All rights reserved.
3+
#
4+
# Description:
5+
# Dockerfile to build an environment for creating integrity-protected VHDX images
6+
#
7+
# DisableDockerDetector "This Dockerfile creates CVM images for testing purposes and is not used in production."
8+
FROM ubuntu:24.04
9+
10+
# Set environment variables
11+
ENV DEBIAN_FRONTEND=noninteractive
12+
ENV TZ=UTC
13+
14+
# Install all build dependencies
15+
RUN apt-get update && apt-get install -y \
16+
qemu-utils \
17+
dracut \
18+
systemd-boot-efi \
19+
systemd-ukify \
20+
libsquashfs-dev \
21+
cryptsetup-bin \
22+
squashfs-tools \
23+
debootstrap \
24+
openssh-server \
25+
rsync \
26+
bc \
27+
curl \
28+
gnupg \
29+
ca-certificates \
30+
apt-transport-https \
31+
lsb-release \
32+
sudo \
33+
parted \
34+
util-linux \
35+
kmod \
36+
udev \
37+
dosfstools \
38+
systemd \
39+
python3 \
40+
binutils \
41+
vim-common \
42+
osslsigncode \
43+
&& rm -rf /var/lib/apt/lists/*
44+
45+
# Create a working directory
46+
WORKDIR /workspace
47+
48+
# Copy the build scripts
49+
COPY build-cvm-image.sh .
50+
COPY scripts/ scripts/
51+
52+
# Make scripts executable
53+
RUN chmod +x build-cvm-image.sh
54+
RUN chmod +x scripts/*.sh
55+
56+
# Create build output directories
57+
RUN mkdir -p /workspace/build /workspace/out
58+
59+
# Set the entrypoint to our build script
60+
ENTRYPOINT ["./build-cvm-image.sh"]

0 commit comments

Comments
 (0)