| 1 |
# From current directory: |
| 2 |
# gcloud builds submit --tag us-docker.pkg.dev/confidential-space-images-dev/cs-tools/measure:latest --project confidential-space-images-dev |
| 3 |
FROM gcr.io/cloud-builders/gcloud |
| 4 |
|
| 5 |
# Prevent interactive prompts during package installation |
| 6 |
ENV DEBIAN_FRONTEND=noninteractive |
| 7 |
|
| 8 |
# Install all necessary CLI tools |
| 9 |
# - cgpt: for GPT partition manipulation |
| 10 |
# - mtools: provides 'mcopy' to read FAT partitions |
| 11 |
# - sbsigntool: provides 'sbattach' to extract EFI signatures |
| 12 |
# - openssl: for hash and certificate processing |
| 13 |
RUN apt-get update && apt-get install -y \ |
| 14 |
apt-transport-https \ |
| 15 |
ca-certificates \ |
| 16 |
gnupg \ |
| 17 |
curl \ |
| 18 |
lsb-release \ |
| 19 |
cgpt \ |
| 20 |
mtools \ |
| 21 |
sbsigntool \ |
| 22 |
openssl \ |
| 23 |
jq \ |
| 24 |
coreutils \ |
| 25 |
gawk \ |
| 26 |
grep \ |
| 27 |
&& rm -rf /var/lib/apt/lists/* |
| 28 |
|
| 29 |
# Copy the measure.sh script into the container |
| 30 |
# Ensure you have the script file in the same directory as this Dockerfile |
| 31 |
COPY measure.sh /usr/local/bin/measure.sh |
| 32 |
RUN chmod +x /usr/local/bin/measure.sh |
| 33 |
|
| 34 |
# Set the working directory for data processing |
| 35 |
WORKDIR /data |
| 36 |
|
| 37 |
# Set the script as the entrypoint |
| 38 |
ENTRYPOINT ["/usr/local/bin/measure.sh"] |