Develop with Docker: Containers for everyone [WCEU 2019 Recap]

Flip Keijzer, June 30, 2019

Talk by Maura Teal

Maura Teal at WCEU

Maura’s talk was scheduled for track 3. I thought that would be in a small area for a small audience. Boy was I wrong. The area was still huge and packed with people! Obviously this subject draws on many of us.

As this was the first track on the first day of WCEU, the announcer asked how many of the attendees in the room were present at ALL the WCEU’s. I discovered there were only a few including me. Then asking who was there for the first time, the show of hands was tremendous. What a large influx of new enthusiasts for WordPress.

Maura works as software developer at Pagely (https://www.linkedin.com/in/maurateal/)

The reason Maura loves working with containers is the need for consistency. Consistency when sharing development environments with colleagues, across locations and platforms.

It is very useful to have an environment which is quick to setup, lightweight and shows powerful performance.

These benefits come with a Docker setup.

For an initial setup you only need a Docker Engine for your OS and a Terminal. You can get your Docker Engine and tons of information about working with it, at Docker.com (https://docs.docker.com/get-started/).

When you have the Docker software you can create the setup Maura recommends for a fairly standard WordPress setup:

 

When you use multiple Docker containers that work together, Maura recommends using Docker compose (https://docs.docker.com/compose/). It will help you by using a yaml file to perform your setup tasks. This enables you to store and commit it in  version control and makes your container setup consistent across your colleagues.

Maura even dares to show a live demo on stage. It works flawlessly and is really quick in its install.

Obviously there is tweaking to do when developing. How to handle outgoing mail for example. You don’t want your development environment sending out e-mails just like that. On the other hand you do want to be able to see what e-mails it tries to send, to verify your WordPress is working as you want.

She points us to https://github.com/10up/wp-local-docker-V2 which is arranging a lot of those details already.

Maura mentions Lando (https://docs.devwithlando.io) as a very interesting tool for container management. It can manage SSL certificates and host settings out of the box for  you. It’s a little different from docker compose as it uses recipes to define your Docker environment.

Maura however strongly recommends to first learn more about Docker itself in stead of solely diving into Lando.


In the Q&A session, I found the following two question interesting:

Q1: How do I deal with developers in my company who by using all kinds of tools have no clue anymore about the underlying web infrastructure. The way a webserver works for example.

A1: Have them spin up servers from scratch as well. Require them to learn more about the basics.


Q2: What about security? If I, as developer am deploying these containers with my code, I think I might be responsible for that as well?

A2: Yes, you are. You might look at managed services for this, to have specialists take over that responsibility.

 

All in all a very interesting introduction into using Dockers for WordPress. Thanks, Maura!

Leave a reply