CICD-140 · Fetch a digest-pinned image
Encyclopedia · Registries and releases · All snippets
Previous · CICD-139 · Next · CICD-141
1. Where it fits
- Placement Bash run step following checkout, or equivalent lab terminal.
- Prerequisites authorized test registry, scoped credentials and candidate artifact.
- Platforms local-linux, github-actions, gitea-actions.
- Parameters
IMAGE_REF.
2. Copy the snippet
bash
[[ "${IMAGE_REF:?}" =~ @sha256:[0-9a-f]{64}$ ]]
docker pull "$IMAGE_REF"3. How it works
Pull resolves the supplied reference and retrieves its layers. Pinning a digest avoids silently selecting a changed tag.
4. Verify the result
Reject mutable references before pulling into the deployment environment.
Validation syntax-validated (Bash parse). Status definitions.