In this blog, we will explore in detail, step by step, how to launch a WordPress app in Docker containers with StackEngine. The purpose of this simple exercise is to get a feel for launching a live, multi-container application with the click of a button.
First, let’s quickly go through the installation process of StackEngine. After signing up for the StackEngine 30 day free trial, you will be presented with an install script on https://app.stackengine.wpengine.com/public/setup.html. This script includes your unique customer number, so will automatically license the free trial.
Clik here to view.

Download and Install StackEngine with copy and paste
Simply copy the install script, ssh into the host where you are installing, and paste.
Note, as part of the install, you may be prompted for your user password for that host; simply enter it.
StackEngine will check to see if Docker is installed already. If not, the script will install it for you. Don’t worry, this extra step is automatic and may take a few minutes.
Clik here to view.

SSH and paste StackEngine install command
Now, just navigate to the external IP address in your browser on port 8443.
StackEngine uses SSL, so please use https://x.x.x.x:8443 and click through any SSL cert warnings presented in your browser.
You can now create a user account on your StackEngine trial instance.
Image may be NSFW.
Clik here to view.
Once you do this, you are presented with the StackEngine Dashboard, which provides you with an quick overview of your entire StackEngine managed Docker infrastructure. You will see that you have 1 host, which is expected. Scan to the lower middle of the dashboard and notice the section for Applications. You will see 1. Click on it.
Clik here to view.

StackEngine Dashboard with pre-configured WordPress app
You are now in the Application function of StackEngine. You could have also clicked on Application in the left Nav to get here. Notice we provide an included pre-configured WordPress application template. The application template includes the WordPress app and a database (MariaDB). Both of these will be pulled from the Docker public hub, which is already pre-configured in StackEngine.
Clik here to view.

Edit your Docker WordPress App with the StackEngine GUI
Now, we will edit the pre-configured application. Click on the WordPress hyperlink and the blue edit button to the left of the WordPress app. From here, you will see the visual representation of the 2 containers. Now double click on the WordPress container, and you will see how it is configured in StackEngine. As a part of this exercise, we are going to change the default port that WordPress is on. Change both the host and container port to 80. Now click apply.
Clik here to view.

Add Docker run commands and environmental variables
Now, just save the new version of the application with the Save button in the upper right of the UI.
Image may be NSFW.
Clik here to view.
You have now created a new version of the app. This allows you to create multiple configurations of any application, save them as versions, adjusting the run and environmental variables as you need. Now, we are going to launch an instance of the app we just created. First, tag this new app version (the one at the top of the list) with a tag “port80”, as this will be the version that we will launch an instance from.
Clik here to view.

Create multiple WordPress app versions
Next click the green Launch button and give the app instance a name, like WordPress. Choose the tag port80 and choose the default resource pool. Click the blue Launch button.
Image may be NSFW.
Clik here to view.
Thats it! At this point, StackEngine will pull the latest images for WordPress and MariaDB from the Docker public hub. We will also configure, run the containers and orchestrate the app onto the host. This may take a minute or two and you may see the Tasks icon blink in the left nav, which means StackEngine is working. As soon as you see the containers appear and in a “running” condition, as in this view below, you will know the application launched successfully.
Clik here to view.

Orchestrate Docker WordPress application
Now, simply use your browser, to navigate to the external IP of that server, in this format:
http://x.x.x.x/wp-admin/install.php
WordPress will respond with its setup wizard. Congratulations, you have successfully launched you first live Docker application with StackEngine!
Image may be NSFW.
Clik here to view.
The post How to Launch a WordPress App in Docker Containers appeared first on StackEngine.