CICD-123 · Check expected Linux image user
Encyclopedia · Docker image building · All snippets
Previous · CICD-122 · Next · CICD-124
1. Where it fits
- Placement Bash run step following checkout, or equivalent lab terminal.
- Prerequisites Docker Engine or BuildKit on a trusted lab runner.
- Platforms local-linux, github-actions, gitea-actions.
2. Copy the snippet
bash
docker image inspect web:ci --format '{{.Config.User}}' | grep -Fx '10001'3. How it works
Inspect reads image metadata rather than launching the application. Use the returned field as an explicit metadata assertion.
4. Verify the result
Verify runtime security controls match the configured user ID.
Validation syntax-validated (Bash parse). Status definitions.