Update IMDS Emulator base image to Google's distroless.

This commit is contained in:
slawek committed 2026-10-20 08:40:34 +02:00
1 parent 1dd1f4043b
commit cedac0a6ee
2 files changed
+12 -7

No files matched your search

+2 -2
View File
@@ -141,11 +141,11 @@ docker compose logs imds-emulator
Requests for paths that the emulator does not serve are logged with the status 404.
`imds-test` in the emulator container tests the emulator. It checks the metadata endpoints and the rejection of requests without the `Metadata-Flavor` header or with `X-Forwarded-For`. It then authenticates with the Compute Engine credentials of `google-auth` against the emulator, the same way as the agent, and checks the token with the Google token information endpoint. With `--bucket`, it also lists the objects of the bucket with the token:
`imds_test.py` in the emulator container tests the emulator. It checks the metadata endpoints and the rejection of requests without the `Metadata-Flavor` header or with `X-Forwarded-For`. It then authenticates with the Compute Engine credentials of `google-auth` against the emulator, the same way as the agent, and checks the token with the Google token information endpoint. With `--bucket`, it also lists the objects of the bucket with the token:
```bash
source ../env.sh
docker compose exec imds-emulator imds-test --bucket "${BUCKET}"
docker compose exec imds-emulator /venv/bin/python3 /app/imds_test.py --bucket "${BUCKET}"
```
It prints `PASS` or `FAIL` for each check and exits with status 1 when a check fails.