Question 1
IntermediateImplement Images Using Podman and Containerfile · Specify the Container Base Image
You are a Cloud Architect designing a containerized application build process for a financial institution. You need to create a Containerfile that compiles a Go application from source and then packages the binary into a minimal runtime image to reduce the attack surface and image size. The build requires several dependencies that are not needed in production. Which strategy should you implement to satisfy these requirements?
Answer and explanation
Correct answer: C
Multi-stage builds allow you to use a heavy image with compilers for the build phase and copy only the necessary artifacts (the binary) to a separate, minimal runtime image. This significantly reduces the final image size and removes build tools that could be security risks.
