Book Image

Docker Bootcamp

By : Russ McKendrick, Pethuru Raj, Jeeva S. Chelladhurai, Vinod Singh
Book Image

Docker Bootcamp

By: Russ McKendrick, Pethuru Raj, Jeeva S. Chelladhurai, Vinod Singh

Overview of this book

<p>Docker allows you to create a robust and resilient environment to generate portable, composable, scalable, and stable application containers.</p> <p>The book starts by installing the core Docker Engine on MacOS, Windows 10 and Linux desktops. We will then define multi-container applications and understand the advantages of using containers locally. Once this is done, we will deploy containers on a single Docker host which is publicly accessible. Furthermore, we will learn how to deploy and configure a Docker Swarm cluster and explore networking and storage third-party plugins to extend the core Docker functionality. Towards the end, the book will demonstrate how to monitor and troubleshoot day-to-day problems in addition to various real world examples of container deployments.</p>
Table of Contents (15 chapters)

Customizing existing images


While the official images should provide you with a fully functioning usable image you may sometimes need to install additional software, in this case we are going to look at installing WordPress CLI using the official WordPress image.

Note

WordPress CLI is a set of command line tools which allow you to manage your WordPress configuration and installation; for more information, see http://wp-cli.org/.

You can find a copy of the Dockerfile below in the /chapter02/wordpress-custom/ folder in the repo, as you can see we are just running RUN and COPYinstructions:

# Adds wp-cli to the offical WordPress image
FROM wordpress:latest
MAINTAINER Russ McKendrick<[email protected]>

# Install the packages we need to run wp-cli
RUN apt-get update &&\
apt-get install -y sudo less mysql-client &&\
curl -o /bin/wp-cli.pharhttps://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

# Copy the wrapper for wp-cli and set the correct execute permissions...