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 COPY
instructions:
# 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...