Install Applications in a Container

The COPY and ADD directives make it easy to add configuration files or download archives to a container image. While we could install applications into a container using only those directives, it would be difficult and complex. Making matters worse, Docker provides no INSTALL directive. Instead, Docker provides a more general mechanism.

In this tutorial, we'll:

  • Introduce the RUN directive and how to run commands during a docker build
  • Use package managers to install applications
  • Describe best practices for installing software in images