Detailed Notes
This series is a short set of tutorials on setting up a docker instance to run and develop your Wordpress installation.
Transcript Text
[Music] all right so today we're going to look at using docker again and like i said before this presentation kind of came out of a necessity a need for me to figure out how to export a wordpress site from a live production environment and actually install it onto my mac m1 machine to actually do some local development tweaking before moving this site to another live uh hosting environment and since traditional vms did not work i started looking at why the industry wasn't jumping the gun and getting on board with getting the new virtual machines on board with the arm chip and as i started researching this and digging into this i started to discover that a lot of the development industry a lot of our developers or even testers have actually kind of gotten away from the vm model a little bit and have gone more with docker or more with container based uh system this way they can use things like arm kubernetes docker to just quickly throw up a container and actually start working with an application without having to deal with the overhead of actually building the operating system so that is what our discussion is going to be about today we're going to look at uh how to set up docker to host a wordpress site we're going to export a live site from hostgator that's a wordpress site and run it inside of our document container and if we have time i will show you how to wrap up the containers so that you can export it to another site quick review of docker docker is essentially another tool like kubernetes or aws where it's designed to make it easier to create deploy and run applications using containers and like i briefly said containers are not vms they're just a package containing all the parts of your application this will include things like your libraries third-party dependencies images basically all the files you need to actually run the application without the overhead of the operating system and it also makes it easier for us to wrap up these containers and deploy them to any container-based environment and again containers are not vm and containers are not vms because simply virtual machines uh typically virtual machines are essentially full emulations of a full operating machine so virtual machines will run any software that runs on a specific bare metal hardware like the infill chip while providing isolation from the real hardware so you kind of have this virtual like a remote desktop into a machine but it's a virtual machine and a vm can also host multiple applications which will mix and match over time versus a container that is typically built for a single application so you're basically building your containers for one application and virtual machines can run multiple and one way to think about this is microsoft has kind of gone with this approach with office 365. so your container or essentially your vm in a windows environment is windows well with their container approach with their applications in with office 365 for example if you actually go out to office 365 and open up microsoft word microsoft word in that situation is essentially your word container you can open up multiple documents inside of this container and in that kind of situation your word container can then essentially have small document containers inside of the word container and if you have this on a windows machine you can have word open you can have excel open so you can have multiple applications also containers allow applications to run in a container environment they share an underlining operating system well vrm systems uh can have different operating systems but it is possible to have a fixed set of applications in a single container using vm all right some of the other things we're going to talk about today so what is wordpress and why do we care well wordpress is one of the largest blogging platforms in use today it's a good online technology it's a good online open source website creation tool this is what we use for our developer nerd site i use it for my doctor whose site velocity consulting dave uses it for walmart consulting site and pretty much any site on the web where people actually produce a lot of content is typically posted in some type of wordpress or crm type environment it's written in php and designed for use with open source technology such as the packing in my table which is perfect because this makes it real easy for us to kind of wrap this all inside of a container all right so that's it for the quick overview and slides we're going to jump out now and we're actually going to do a full hands-on demo today and we're going to look at installing and setting up docker we're going to go over some of the docker command line commands using docker compose which is going to simplify a lot of our discussion today if you want a more deeper dive into doctor or if this is your first time paying doctor i recommend you go back into our video library and look at our previous presentations on how what docker is how to set up doctor uh and kubernetes and finally we're going to package and deploy a live wordpress site my millage consulting site from a live website to a local container running on my any questions at this point is everyone clear on what we're going to be talking about today yes sir we're good awesome all right so just a quick little bit of housekeeping so first we're going to need to go to a couple different sites uh if you don't have docker installed you need to go to docker.com and look for the get started link usually in the upper right hand corner if you click this guy you're going to be taken to the software site the main thing you want to be concerned about is installing the docker desktop now if you are a mac user you need to be very specific on the version you select if you have the new macbook pro m1 chip do not install the mac intel chip it will not work in fact it will actually make your life a pain because then you have to go find libraries delete them all and then reinstall the correct one which is the download for the mac multiple tip the m1 windows just download windows and linux is easy it's just download the linux doctor hub is not necessary for this presentation but it is a nice place to go uh to upload your cloud-based applications test them live in the cloud and there's some other different pricing options there again if you want to learn more about this go back and check out the doctor presentations that we've done previously next you want to make sure that you have docker compose install uh it is uh if you go to basically i just did a quick google search for this so if you google docker compose typically it's the first one you want look for install docker compose and then if you scroll down a little bit it'll give you the tabs here for how to install docker compose on the different machines it's a command line install typically uh so i would use the directions for your specific operating system again i've covered this previously in previous presentations but um if you have not watched them uh these are the two mandatory components that you need to get started today the other thing we're going to look at real quickly before i get into the docker setup locally is we're going to look at a lot my live website elashconsulting.com so this is my personal consulting business melange consulting this is a wordpress site that i put together to market my business and it's got some basic information all built in php on the back end it is wordpress so in order for us to easily export this live wordpress site i recommend going to the plugins page and do a search for all in one search for the plugin and what we want is we want this all-in-one wordpress migration so you want to make sure that you find this plugin and install it on your site and then when you go to their little how-to or help pop up here they'll walk you through okay install it add it and then go through the install activities and then if you go out to their actual screenshots and reviews it walks you through how to actually use the tool it's actually real easy really straightforward so if you go to want to install it you go to the all in one wordpress migration go to export and then you just click add if you want to add specific content or you can just do export to and tell it hey uh export my entire site so if you don't add anything it will export everything you can say file ftp dropbox uh depending upon the server you are hosting wordpress on the file option may not be viable because you may not have enough disk space on your hosting provider to actually export the site to it so you might want to look at some other options like maybe up to dropbox or one of these other private if you do have a large production box by all means do file otherwise you might just want to install ftp zilla and or filezilla and use that to host a ftp server locally and just export your files from your site to your local machine for now i'll just select file it's going to go through it's going to analyze the site uh tell you where you might have some problems for exporting and then you just kind of go through and check the boxes and continue to you get down to export the file i'm not going to walk through that because this will take a little bit of time uh if you want to again see all the different pieces or walk through the components you can just go to their plugins and if we look at your details screenshots so you start by exporting your site you can then uh filter out you know do not export spam content so you can remove uh media that you don't want import same kind of thing you just take the file and stick it in so once you do export you select file and then it just basically goes through and you have a couple uh additional screens once the files created you then download it to your environment your local machine or to your new production environment that's how quick and easy it is to export your wordpress site uh there are more complex more advanced ways to do it but for a typical simple migration like this this tool is perfect it's free and it will do 99 of what you need but once you are done it generates the file you download your file and then you move over to your local environment okay and i will just start with dr diphthong so if we go to doctor desktop so if you've gone through the doctor's site installed your local doctor environment doctor desktop it will ask you to log in it's free go ahead and create your account sign in it's actually neat because even with the free plan you have the capabilities of uploading to the doctor hub and you can test out your containers live in the cloud there's some additional settings you can do here if you want but we're not going to get into those today again more details on the doctor container and doctor go check that our previous person all right so i've started out clean i've removed all my local doctor containers for now for this presentation so right now my containers and apps are empty my images are empty i have no docker images currently loaded and i have no vertical drives for or volumes for my factory containers so what we need to do is we need to go out to our command line and the bird but actually before we do this so let me so the first thing we actually want to make sure we want to make sure that we have doctor compose installed so for that we will type docker compose sd and it tells me yes i have docker compose version 129.2 installed and so once we have document compose installed we actually need to build a docker compose file so i will go out to my development environment so i am in my users um development i create a specific workspace for my doctor environments and i've created a wordpress folder so inside of this folder clean that guy up even though i cleared out my volumes my test code was still there and i'll explain what all those files are in just a second you
Transcript Segments
[Music]
all right so today we're going to look
at using docker again
and
like i said before this presentation
kind of came out of a necessity a need
for me to figure out how to
export a wordpress site from a live
production environment and actually
install it onto my mac m1 machine to
actually do some local development
tweaking before moving this site to
another live uh hosting environment and
since traditional vms did not work
i started looking at why
the industry wasn't
jumping the gun and getting on board
with getting the new virtual machines on
board with the arm chip
and as i started researching this and
digging into this i started to discover
that a lot of the
development industry a lot of our
developers or even testers have actually
kind of gotten away from the vm model a
little bit and have gone more with
docker or more with container based uh
system this way they can use things like
arm kubernetes docker to just quickly
throw up a
container and actually start working
with an application without having to
deal with the overhead of actually
building the operating system
so that is what our discussion is going
to be about today we're going to look at
uh
how to set up docker to host a wordpress
site we're going to export a live site
from hostgator
that's a wordpress site and run it
inside of our document container and if
we have time i will show you how to wrap
up the containers so that you can export
it to another site
quick review of docker
docker is essentially another tool like
kubernetes or
aws where it's designed to make it
easier to create deploy and run
applications using containers
and like i briefly said containers
are not vms they're just a package
containing all the parts of your
application
this will include things like your
libraries third-party dependencies
images basically all the files you need
to actually run the application without
the overhead of the operating system
and it also makes it easier for us to
wrap up these containers and deploy them
to any container-based environment
and again containers are not vm
and containers are not vms because
simply virtual machines
uh
typically virtual machines are
essentially full emulations of a full
operating machine so virtual machines
will run any software that runs on a
specific bare metal hardware like the
infill chip while providing isolation
from the real hardware so you kind of
have this virtual like a remote desktop
into a
machine but it's a virtual machine
and a vm can also host multiple
applications which will mix and match
over time versus
a container that is typically built for
a single application so you're basically
building your containers for one
application and virtual machines can run
multiple
and one way to think about this is
microsoft has kind of gone with this
approach with office 365. so your
container
or essentially your vm
in a windows environment is windows
well with their container approach with
their applications in with office 365
for example if you actually go out to
office 365 and open up microsoft word
microsoft word in that situation is
essentially your word container you can
open up multiple documents inside of
this container and in that kind of
situation your
word container
can then essentially have small
document containers inside of the
word container and if you have this on a
windows machine you can have word open
you can have excel open so you can have
multiple applications
also containers allow applications to
run in a container environment
they share an underlining operating
system well vrm systems uh can have
different operating systems
but it is possible to have a fixed set
of applications in a single container
using vm
all right some of the other things we're
going to talk about today so what is
wordpress and why do we care well
wordpress is one of the largest blogging
platforms in use today
it's a good online
technology
it's a good online open source website
creation tool this is what we use for
our developer nerd site i use it for my
doctor whose site velocity consulting
dave uses it for walmart consulting site
and pretty much any site on the web
where people actually produce a lot of
content is typically posted in some type
of wordpress
or crm type environment it's written in
php and designed for use with open
source technology such as the packing in
my table
which is perfect because this makes it
real easy for us to kind of wrap this
all inside of a container
all right so that's it for the quick
overview and slides we're going to jump
out now and we're actually going to do a
full hands-on demo today and we're going
to look at installing and setting up
docker we're going to go over some of
the docker command line commands using
docker compose which is going to
simplify a lot of our discussion today
if you want a more deeper dive into
doctor
or if this is your first time paying
doctor i recommend you go back into our
video library and look at our previous
presentations on how what docker is how
to set up doctor uh and kubernetes and
finally we're going to package and
deploy a live wordpress site my millage
consulting site from a live website to a
local container running on my
any questions at this point is everyone
clear on what we're going to be talking
about today
yes sir we're good
awesome
all right so
just a quick little bit of housekeeping
so first we're going to need to go to a
couple different sites uh if you don't
have docker installed you need to go to
docker.com
and look for the get started link
usually in the upper right hand corner
if you click this guy
you're going to be taken to the software
site
the main thing you want to be
concerned about is installing the docker
desktop
now
if you are a mac user
you need to be very specific on the
version you select if you have the new
macbook pro m1 chip do not install the
mac intel chip it will not work in fact
it will actually make your life a pain
because then you have to go find
libraries delete them all and then
reinstall the correct one which is the
download for the mac multiple tip
the m1
windows just download windows and linux
is easy it's just download the linux
doctor hub is not necessary for this
presentation but it is a nice place to
go uh to
upload your cloud-based applications
test them live in the cloud and there's
some other different pricing options
there again if you want to learn more
about this go back and check out the
doctor presentations that we've done
previously
next you want to make sure that you have
docker compose install
uh it is uh if you go to
basically i just did a quick google
search for this so if you google docker
compose
typically it's the first one you want
look for install docker compose and then
if you scroll down a little bit it'll
give you the tabs here for how to
install docker compose on the different
machines
it's a command line install typically
uh so i would use the directions for
your specific operating system
again i've covered this previously in
previous presentations but um if you
have not watched them uh these are the
two mandatory components that you need
to get started today
the other thing we're going to look at
real quickly before i get into the
docker
setup locally is we're going to look at
a lot my live website
elashconsulting.com so this is my
personal consulting business melange
consulting this is a wordpress site that
i put together to market my
business and it's got some basic
information all built in php on the back
end it is
wordpress
so in order for us to easily
export this live wordpress site i
recommend going to the plugins page
and do a search for all in one
search for the plugin and what we want
is we want this all-in-one wordpress
migration
so you want to make sure that you find
this plugin and install it on your site
and then when you go to their little
how-to or help pop up here they'll walk
you through okay install it add it and
then go through the install activities
and then if you go out to their actual
screenshots and reviews it walks you
through how to actually
use the tool
it's actually real easy really
straightforward so if you go to want to
install it you go to the all in one
wordpress migration
go to export
and then you just click add
if you want to add specific content or
you can just do export to
and tell it hey uh export my entire site
so if you don't add anything it will
export everything
you can say file ftp dropbox
uh depending upon the server you are
hosting wordpress on
the file option may not be
viable because you may not have enough
disk space on your hosting provider to
actually export the site to it so you
might want to look at some other options
like maybe up to dropbox
or one of these other private
if you do have a large
production box by all means do file
otherwise you might just want to install
ftp zilla
and
or filezilla and use that to host a ftp
server locally and just export your
files from your site to your local
machine
for now i'll just select file it's going
to go through it's going to analyze the
site uh tell you where you might have
some problems for exporting
and then you just kind of go through and
check the boxes and continue to you get
down to export the file
i'm not going to walk through that
because this will take a
little bit of time uh if you want to
again see
all the different pieces
or walk through the components you can
just go to their plugins
and if we look at your details
screenshots so you start by exporting
your site
you can then uh filter out you know do
not export spam content so you can
remove uh media that you don't want
import same kind of thing you just take
the file and stick it in
so once you do export you select file
and then it just basically goes through
and you have a couple uh additional
screens
once the files
created you then download it to your
environment your local machine or to
your new production environment that's
how quick and easy it is to export your
wordpress site
uh there are more complex more advanced
ways to do it but for a typical simple
migration like this this tool is perfect
it's free and it will do 99 of what you
need
but once you are done it generates the
file you download your file and then you
move over to your local environment
okay
and i will just start with dr diphthong
so if we go to doctor desktop
so if you've gone through the doctor's
site installed your local doctor
environment doctor desktop it will ask
you to log in
it's free go ahead and create your
account sign in
it's actually neat because even with the
free plan you have the capabilities of
uploading to the doctor hub and you can
test out your
containers live
in the cloud
there's some additional settings you can
do here if you want but we're not going
to get into those today
again more details on the doctor
container and doctor go check that our
previous person
all right so i've started out clean i've
removed all my local doctor containers
for now for this presentation so right
now my containers and apps are empty
my images are empty i have no docker
images currently loaded and i have no
vertical
drives for or volumes for my factory
containers
so what we need to do is we need to go
out to our command line
and the bird but actually before we do
this
so let me so the first thing we actually
want to make sure we want to make sure
that we have doctor compose installed so
for that we will type docker
compose
sd
and it tells me yes i have docker
compose version 129.2 installed
and
so once we have document compose
installed we actually need to build a
docker compose file
so i will go out to my development
environment
so
i am in my users
um
development i create a specific
workspace for my doctor
environments
and i've created a wordpress folder so
inside of this folder
clean that guy up
even though i cleared out my volumes my
test code was still there
and i'll explain what all those files
are in just a second
you