Exercise 1: A glibc-Dependent Application Targeted at an Alpine Image — Possible Solution ==================================================================== WHY ALPINE IS THE DEFAULT RECOMMENDATION IN THE FIRST PLACE ------------------------------ Per this chapter's own table, "Docker base image for a microservice" defaults to "Alpine - unless a real glibc dependency exists," reasoned from "smallest footprint, fastest pulls, smaller attack surface (Chapter 5)." Alpine is the sensible starting point specifically because of its small size and reduced attack surface - genuinely valuable properties for a containerized microservice. WHY THE GLIBC DEPENDENCY CHANGES THE RECOMMENDATION ------------------------------ Per Chapter 5's own warn-box, "software compiled or tested only against glibc can behave subtly differently, or fail outright, under musl." Alpine uses musl instead of glibc - if the application's library genuinely depends on glibc-specific behavior, running it on Alpine risks exactly the subtle bugs or outright failures Chapter 5 already warned about, regardless of how attractive Alpine's own size advantage is. WHAT SHOULD HAPPEN INSTEAD, PER THIS CHAPTER'S OWN TABLE ------------------------------ Per this chapter's own table entry, the exception case explicitly names "glibc-based alternative if Chapter 5's own compatibility warning applies." Rather than forcing the application onto Alpine and risking compatibility problems, the colleague should choose a different, still reasonably minimal base image that provides glibc - trading away some of Alpine's own size advantage in exchange for guaranteed compatibility with the library's actual requirements. WHY THIS ISN'T ABANDONING THE FRAMEWORK, BUT APPLYING IT CORRECTLY ------------------------------ This chapter's own six-question framework doesn't recommend Alpine unconditionally for every container - it explicitly builds in the glibc exception as part of the same decision process. Choosing a glibc-based image here isn't a departure from the framework; it's exactly what the framework itself calls for once question 5 (does minimal footprint genuinely matter) is weighed honestly against a real, known compatibility constraint. WHY THIS WORKS AS AN ANSWER ------------------------------ It explains why Alpine is the normal default, cites Chapter 5's own warn-box to explain why a glibc dependency breaks that default, and identifies the specific corrected recommendation (a glibc-based alternative) this chapter's own table already accounts for as the built-in exception case.