CHAPTER 15 Sidecar A  Sidecar  container extends and enhances the functionality of a preexisting container without changing it. This pattern is one of the fundamental container patterns that allows single-purpose containers to cooperate closely together. In this chapter, we learn all about the basic  Sidecar  concept. The specialized follow-up patterns,  Adapter and  Ambassador , are discussed in Chapter 16 and Chapter 17, respectively. Containers are a popular packaging technology that allows developers and system administrators to build, ship, and run applications in a unified way. A container rep‐ resents a natural boundary for a unit of functionality with a distinct runtime, release cycle, API, and team owning it. A proper container behaves like a single Linux pro‐ cess—solves one problem and does it well—and is created with the idea of replacea‐ bility and reuse. This last part is essential as it allows us to build applications more quickly by leveraging existing specialized containers. Today, to make an HTTP call, we don’t have to write a client library, but use an exist‐ ing one. In the same way, to serve a website, we don’t have to create a container for a web server, but use an existing one. This approach allows developers to avoid rein‐ venting the wheel and create an ecosystem with a smaller number of better-quality containers to maintain. However, having single-purpose reusable containers requires ways of extending the functionality of a container and a means for collaboration among containers. The  Sidecar  pattern describes this kind of collaboration where a container enhances the functionality of another preexisting container. Problem 131