Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Docker Cookbook

You're reading from   Docker Cookbook Over 100 practical and insightful recipes to build distributed applications with Docker

Arrow left icon
Product type Paperback
Published in Aug 2018
Publisher
ISBN-13 9781788626866
Length 352 pages
Edition 2nd Edition
Tools
Arrow right icon
Authors (3):
Arrow left icon
 Cochrane Cochrane
Author Profile Icon Cochrane
Cochrane
Jeeva S. Chelladhurai Jeeva S. Chelladhurai
Author Profile Icon Jeeva S. Chelladhurai
Jeeva S. Chelladhurai
 K Khare K Khare
Author Profile Icon K Khare
K Khare
Arrow right icon
View More author details
Toc

Table of Contents (19) Chapters Close

Title Page
Copyright and Credits
Dedication
Packt Upsell
Contributors
Preface
1. Introduction and Installation FREE CHAPTER 2. Working with Docker Containers 3. Working with Docker Images 4. Network and Data Management for Containers 5. Docker Use Cases 6. Docker APIs and SDKs 7. Docker Performance 8. Docker Orchestration and Hosting a Platform 9. Docker Security 10. Getting Help and Tips and Tricks 11. Docker on the Cloud 1. Other Books You May Enjoy Index

Deploying WordPress on Docker for AWS


Now that we have an active Docker for AWS installation set up, let's deploy an application to see how it works. In this recipe, we will be installing WordPress on top of Docker for AWS.

Getting ready

Before we proceed, you will need to make sure that you have satisfied all of the prerequisites:

  1. You will need to have your Docker for AWS stack from the previous recipe up and running.
  2. SSH into one of the manager nodes. Instructions on how to do this are also available in the previous recipe.

How to do it...

Once we are logged in to one of the manager nodes, the first thing we need to do is create some swarm secrets for our database passwords:

$ echo "myDbP@SSwods" | docker secret create root_db_password -
$ echo "myWpressPw" | docker secret create wp_db_password -

 

We also need to create an overlay network so that our services can talk with each other:

$ docker network create -d overlay wp

Let's create the MariaDB database service that WordPress is going to use;...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime
Visually different images