Bird
0
0

How can you combine reducing image size with security best practices in Docker images?

hard📝 Application Q9 of 15
Docker - Image Optimization
How can you combine reducing image size with security best practices in Docker images?
AIgnore user permissions to focus on size only
BUse minimal base images and run as non-root user
CInstall all packages including build tools in final image
DUse full OS images and root user for compatibility
Step-by-Step Solution
Solution:
  1. Step 1: Choose minimal base images

    Minimal images reduce size and attack surface.
  2. Step 2: Run container as non-root user

    Running as non-root improves security without increasing size.
  3. Final Answer:

    Minimal base images plus non-root user improve size and security. -> Option B
  4. Quick Check:

    Minimal image + non-root = secure & small [OK]
Quick Trick: Combine minimal images with non-root user for security and size [OK]
Common Mistakes:
  • Using root user
  • Installing unnecessary packages
  • Ignoring security for size

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Docker Quizzes