Building & Pushing Docker Images in CI — Concept Check
Questions on Building & Pushing Docker Images in CI. A production Docker build pipeline builds multi-arch images, uses layer caching, scans for CVEs, and pushes to a registry with semantic version tags — all automated on every commit.
Questions in this quiz
7 questions on Building & Pushing Docker Images in CI — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.In a CI pipeline using Docker, what is the advantage of using Docker Buildx?
- AImproves image security scanning
- BEnables multi-platform builds
- CSimplifies login to Docker Hub
- DReduces image size
2.A developer notices that the Docker images are not tagged correctly in the CI pipeline. Which step is likely missing?
- ASetting up Docker Buildx
- BExtracting Docker metadata
- CRunning Trivy vulnerability scanner
- DConfiguring AWS credentials
3.During a CI run, the Trivy scan fails due to critical vulnerabilities. What happens next?
- AThe image is pushed with a warning
- BThe scan results are uploaded but do not affect the pipeline
- CThe pipeline fails and stops further execution
- DThe vulnerabilities are ignored
4.Why might a CI pipeline use GitHub Actions Cache for Docker builds?
- ATo simplify registry login
- BTo improve security scanning
- CTo increase cache hit rate and speed up builds
- DTo automatically tag images
5.A team sets up a CI pipeline for Docker images but finds the images are not pushed to the registry. What might be the cause?
- AAWS credentials are missing
- BTrivy scan is not configured
- CDocker Buildx is not set up
- DThe pipeline is triggered by a pull request
6.What is the role of the 'docker/build-push-action' in a CI pipeline?
- AOnly pushes Docker images to the registry
- BOnly builds Docker images
- COnly scans images for vulnerabilities
- DHandles multi-platform builds, caching, tagging, and pushing
7.A CI pipeline uses OIDC for AWS ECR authentication. What is an advantage of this approach?
- AImproves image build speed
- BEnhances Docker image tagging
- CEliminates the need for long-lived AWS keys
- DSimplifies Dockerfile syntax