This is part five of five in my Use Docker to create a local WordPress development environment tutorial.
In this article, we’re going to review what we learned and put a few final touches on our Docker Compose application to combine everything we learned.
In WordPress and Docker: Introduction to Docker and basic Docker commands, I introduced some high-level concepts around Docker images and containers, and showed you how to get started with the creation, use, and management of Docker resources on the command line.
Continue reading “WordPress and Docker: Putting it all together”
This is part four of five in my Use Docker to create a local WordPress development environment tutorial.
About Dockerfiles
Dockerfiles are text files that provide instructions to Docker on how to start with an existing image and build a new, customized image through a series of instructions. I was aware of Dockerfiles from my introduction to Docker on LinkedIn Learning. I did not think I would need them for a basic WordPress environment. But I wanted to learn more about them, and thought that I could use Dockerfiles to create customized WordPress and phpMyAdmin images to use with Docker Compose. That way I could avoid manually customizing the container the way I did in WordPress and Docker: Customize a Docker container.
Continue reading “WordPress and Docker: Build custom images with Dockerfiles”
This is part three of five in my Use Docker to create a local WordPress development environment tutorial.
While I am using these containers to build and improve a WordPress site, sometimes I need to make changes to the containers themselves to meet my requirements.
By default PHP restricts the size the files you can upload into WordPress to 2MB. This is limiting, because I may want to upload an audio file or a high-res photo. And if I want to import the database for an existing WordPress site into phpMyAdmin, that database can easily be larger than the 2MB cut off. So I need to change that value in PHP.ini. Let’s start with the container created from wordpress:latest
, which I named wp
in my Docker Compose file. First, I will enter the container to use Bash as root using the docker exec
command. The docker exec
allows you to run a command in the container. This command looks a lot like the command we used in WordPress and Docker: Introduction to Docker and basic Docker commands to create a container and enter it with a Bash shell – note the -ti
and bash
options, with the name of the container, wp
.
$ docker exec -ti wp bash
Continue reading “WordPress and Docker: Customize a Docker container”
This is part two of five in my Use Docker to create a local WordPress development environment tutorial.
I was wondering about how one might use Docker to create a local WordPress site and quickly found a tutorial from Docker. The tutorial leverages another component of Docker, Docker Compose, which is often used for the orchestration of multiple containers that work together. That’s the way I tried to say it, but here’s how Docker explains Docker Compose:
… A tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. Then, with a single command, you create and start all the services from your configuration.
Docker.com
Continue reading “WordPress and Docker: Use Docker Compose”
This is part one of five in my Use Docker to create a local WordPress development environment tutorial.
Docker Terminology
The two most important terms to understand with Docker are images and containers. Some people use the terms interchangeably, but they are not. I could try and explain it, but Docker already did a better job:
Fundamentally, a container is nothing but a running process, with some added encapsulation features applied to it in order to keep it isolated from the host and from other containers. One of the most important aspects of container isolation is that each container interacts with its own private filesystem; this filesystem is provided by a Docker image. An image includes everything needed to run an application – the code or binary, runtimes, dependencies, and any other filesystem objects required.
Docker.com
Continue reading “WordPress and Docker: Introduction to Docker and basic Docker commands”