SlideShare a Scribd company logo
1 of 25
Download to read offline
@mlteal | #WCPHX | 2019
Develop With Docker
Containers for everyone!
@mlteal | #WCPHX | 2019
Maura Teal (@mlteal)
Software Engineer
at Pagely and NorthStack
@mlteal | #WCPHX | 2019
Docker Docker Docker…
@mlteal | #WCPHX | 2019
Local Development
• Local machine
• MAMP/WAMP/XAMPP
• Vagrant
• Varying Vagrant Vagrants (VVV)
• ServerPress, Local by Flywheel, etc
@mlteal | #WCPHX | 2019
What & Why?
1. https://aws.amazon.com/docker/
2. https://www.docker.com/why-docker
• “Software platform that allows you to build, test,
and deploy applications quickly”
• [Relatively] simple yet powerful tooling
• Performance
Docker Docker Docker…
@mlteal | #WCPHX | 2019
Project
Service A
(Database)
Image: mysql-5.7
Getting Started with Docker
Service B
(Webserver)
Image: nginx
Service C
(WordPress)
Image: php7.2-fpm
@mlteal | #WCPHX | 2019
Why Docker
• Consistency
• Consistency
• Consistency
@mlteal | #WCPHX | 2019
Required
• Docker for [your OS]
• Terminal
Getting Started with Docker
Optional
• Homebrew (MacOS/Linux)
• Docker Compose
@mlteal | #WCPHX | 2019
DockerHub
Images are published to
DockerHub and are
downloaded and used as
a quick-start for projects.
Starting with an Image
@mlteal | #WCPHX | 2019
Starting with an Image
@mlteal | #WCPHX | 2019
Starting with a Dockerfile
A Dockerfile is a text file that contains the commands a user wants
to call to assemble an image.
• A linux distribution
• PHP
Basic Platform Requirements
• Apache and/or NGINX
• MySQL
@mlteal | #WCPHX | 2019
Starting with a Dockerfile
FROM wordpress:php7.1-apache
COPY . /var/www/html
Starting with an all-in-one approach:
1. Download WP Core into a directory on your local machine
2. Create a Dockerfile in that directory with the following:
@mlteal | #WCPHX | 2019
Starting with a Dockerfile
Starting with an all-in-one approach:
🦄 :~$ cd myproject
🦄 :myproject$ docker build -t ‘my-image’ .
🦄 :myproject$ docker run --name mysql-cont -e MYSQL_ROOT_PASSWORD=qwerty -d
mysql:5.7
🦄 :myproject$ docker run --name wp-cont --link mysql-cont:mysql -p 8000:80 -d my-image
🦄 :myproject$ docker stop wp-cont
3. Build the image
4. Run the mysql container
5. Run the WP container — accessed at http://localhost:8000
@mlteal | #WCPHX | 2019
Important Commands
🦄 :~$ docker image ls
🦄 :~$ docker inspect [IMAGE TAG or ID]
🦄 :~$ docker stop [CONTAINER NAME]
🦄 :~$ docker ps # lists ALL containers and their statuses
🦄 :~$ docker ps | grep [Container ID OR Name (can be partial)]
🦄 :~$ docker exec -ti [Container ID or Name] bash
Find docs and all commands at
https://docs.docker.com/engine/reference/commandline/
@mlteal | #WCPHX | 2019
A fork in the road
@mlteal | #WCPHX | 2019
Enter: Docker Compose
@mlteal | #WCPHX | 2019
Docker Compose
docker-compose.yml defines container configuration & links
@mlteal | #WCPHX | 2019
@mlteal | #WCPHX | 2019@mlteal | #WCPHX | 2019
@mlteal | #WCPHX | 2019
Docker Compose
🦄 :~$ cd myproject
🦄 :myproject$ docker-compose up
…
🦄 :myproject$ docker-compose down
1. Build and run your app with compose:
@mlteal | #WCPHX | 2019
@mlteal | #WCPHX | 2019
• Hostname handling

(use dnsmasq/proxy)
• SSL certs for local dev
• Local Email handling
Handling Details
https://github.com/10up/wp-local-docker-v2
@mlteal | #WCPHX | 2019
Handling Details (Lando)
@mlteal | #WCPHX | 2019
• DockerHub

https://hub.docker.com/
• Docker Compose Docs

https://docs.docker.com/compose/
• Lando

https://docs.devwithlando.io/
Moar Resources
@mlteal | #WCPHX | 2019
@mlteal | #WCPHX | 2019
Maura Teal
@mlteal

More Related Content

What's hot

DockerDay2015: Docker orchestration for sysadmin
DockerDay2015: Docker orchestration for sysadminDockerDay2015: Docker orchestration for sysadmin
DockerDay2015: Docker orchestration for sysadminDocker-Hanoi
 
Docker- Ha Noi - Year end 2015 party
Docker- Ha Noi - Year end 2015 partyDocker- Ha Noi - Year end 2015 party
Docker- Ha Noi - Year end 2015 partyVan Phuc
 
Intro to docker - innovation demo 2022
Intro to docker - innovation demo 2022Intro to docker - innovation demo 2022
Intro to docker - innovation demo 2022Hussain Mansoor
 
Docker?!?! But I'm a SysAdmin
Docker?!?! But I'm a SysAdminDocker?!?! But I'm a SysAdmin
Docker?!?! But I'm a SysAdminDocker, Inc.
 
DockerCon EU 2015: Speed Up Deployment: Building a Distributed Docker Registr...
DockerCon EU 2015: Speed Up Deployment: Building a Distributed Docker Registr...DockerCon EU 2015: Speed Up Deployment: Building a Distributed Docker Registr...
DockerCon EU 2015: Speed Up Deployment: Building a Distributed Docker Registr...Docker, Inc.
 
DockerDay2015: Keynote
DockerDay2015: KeynoteDockerDay2015: Keynote
DockerDay2015: KeynoteDocker-Hanoi
 
Kubernetes in Docker
Kubernetes in DockerKubernetes in Docker
Kubernetes in DockerDocker, Inc.
 
Docker Online Meetup: Announcing Docker CE + EE
Docker Online Meetup: Announcing Docker CE + EEDocker Online Meetup: Announcing Docker CE + EE
Docker Online Meetup: Announcing Docker CE + EEDocker, Inc.
 
Immutable infrastructure with Docker and EC2
Immutable infrastructure with Docker and EC2Immutable infrastructure with Docker and EC2
Immutable infrastructure with Docker and EC2dotCloud
 
Docker on Google App Engine
Docker on Google App EngineDocker on Google App Engine
Docker on Google App EngineDocker, Inc.
 
Introduction to Docker - 2017
Introduction to Docker - 2017Introduction to Docker - 2017
Introduction to Docker - 2017Docker, Inc.
 
DCSF19 How To Build Your Containerization Strategy
DCSF19 How To Build Your Containerization Strategy  DCSF19 How To Build Your Containerization Strategy
DCSF19 How To Build Your Containerization Strategy Docker, Inc.
 
Docker at Spotify - Dockercon14
Docker at Spotify - Dockercon14Docker at Spotify - Dockercon14
Docker at Spotify - Dockercon14dotCloud
 
DockerDay2015: Docker orchestration for developers
DockerDay2015: Docker orchestration for developersDockerDay2015: Docker orchestration for developers
DockerDay2015: Docker orchestration for developersDocker-Hanoi
 
Node.js Rocks in Docker for Dev and Ops
Node.js Rocks in Docker for Dev and OpsNode.js Rocks in Docker for Dev and Ops
Node.js Rocks in Docker for Dev and OpsBret Fisher
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to DockerAditya Konarde
 
Production Ready Containers from IBM and Docker
Production Ready Containers from IBM and DockerProduction Ready Containers from IBM and Docker
Production Ready Containers from IBM and DockerDocker, Inc.
 
DCSF19 How Docker Simplifies Kubernetes for the Masses
DCSF19 How Docker Simplifies Kubernetes for the Masses  DCSF19 How Docker Simplifies Kubernetes for the Masses
DCSF19 How Docker Simplifies Kubernetes for the Masses Docker, Inc.
 

What's hot (20)

DockerDay2015: Docker orchestration for sysadmin
DockerDay2015: Docker orchestration for sysadminDockerDay2015: Docker orchestration for sysadmin
DockerDay2015: Docker orchestration for sysadmin
 
Docker- Ha Noi - Year end 2015 party
Docker- Ha Noi - Year end 2015 partyDocker- Ha Noi - Year end 2015 party
Docker- Ha Noi - Year end 2015 party
 
Intro to docker - innovation demo 2022
Intro to docker - innovation demo 2022Intro to docker - innovation demo 2022
Intro to docker - innovation demo 2022
 
Docker?!?! But I'm a SysAdmin
Docker?!?! But I'm a SysAdminDocker?!?! But I'm a SysAdmin
Docker?!?! But I'm a SysAdmin
 
DockerCon EU 2015: Speed Up Deployment: Building a Distributed Docker Registr...
DockerCon EU 2015: Speed Up Deployment: Building a Distributed Docker Registr...DockerCon EU 2015: Speed Up Deployment: Building a Distributed Docker Registr...
DockerCon EU 2015: Speed Up Deployment: Building a Distributed Docker Registr...
 
DockerDay2015: Keynote
DockerDay2015: KeynoteDockerDay2015: Keynote
DockerDay2015: Keynote
 
Kubernetes in Docker
Kubernetes in DockerKubernetes in Docker
Kubernetes in Docker
 
Docker Online Meetup: Announcing Docker CE + EE
Docker Online Meetup: Announcing Docker CE + EEDocker Online Meetup: Announcing Docker CE + EE
Docker Online Meetup: Announcing Docker CE + EE
 
Immutable infrastructure with Docker and EC2
Immutable infrastructure with Docker and EC2Immutable infrastructure with Docker and EC2
Immutable infrastructure with Docker and EC2
 
Docker on Google App Engine
Docker on Google App EngineDocker on Google App Engine
Docker on Google App Engine
 
Docker on Docker
Docker on DockerDocker on Docker
Docker on Docker
 
Introduction to Docker - 2017
Introduction to Docker - 2017Introduction to Docker - 2017
Introduction to Docker - 2017
 
Intro to docker
Intro to dockerIntro to docker
Intro to docker
 
DCSF19 How To Build Your Containerization Strategy
DCSF19 How To Build Your Containerization Strategy  DCSF19 How To Build Your Containerization Strategy
DCSF19 How To Build Your Containerization Strategy
 
Docker at Spotify - Dockercon14
Docker at Spotify - Dockercon14Docker at Spotify - Dockercon14
Docker at Spotify - Dockercon14
 
DockerDay2015: Docker orchestration for developers
DockerDay2015: Docker orchestration for developersDockerDay2015: Docker orchestration for developers
DockerDay2015: Docker orchestration for developers
 
Node.js Rocks in Docker for Dev and Ops
Node.js Rocks in Docker for Dev and OpsNode.js Rocks in Docker for Dev and Ops
Node.js Rocks in Docker for Dev and Ops
 
Introduction to Docker
Introduction to DockerIntroduction to Docker
Introduction to Docker
 
Production Ready Containers from IBM and Docker
Production Ready Containers from IBM and DockerProduction Ready Containers from IBM and Docker
Production Ready Containers from IBM and Docker
 
DCSF19 How Docker Simplifies Kubernetes for the Masses
DCSF19 How Docker Simplifies Kubernetes for the Masses  DCSF19 How Docker Simplifies Kubernetes for the Masses
DCSF19 How Docker Simplifies Kubernetes for the Masses
 

Similar to Dev with Docker WCPHX 2019

Architecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based DeploymentsArchitecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based DeploymentsBen Hall
 
Docker Container As A Service - Mix-IT 2016
Docker Container As A Service - Mix-IT 2016Docker Container As A Service - Mix-IT 2016
Docker Container As A Service - Mix-IT 2016Patrick Chanezon
 
[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안양재동 코드랩
 
Docker for Web Developers: A Sneak Peek
Docker for Web Developers: A Sneak PeekDocker for Web Developers: A Sneak Peek
Docker for Web Developers: A Sneak Peekmsyukor
 
Docker for developers on mac and windows
Docker for developers on mac and windowsDocker for developers on mac and windows
Docker for developers on mac and windowsDocker, Inc.
 
From Docker to Production - ZendCon 2016
From Docker to Production - ZendCon 2016From Docker to Production - ZendCon 2016
From Docker to Production - ZendCon 2016Chris Tankersley
 
Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)Ben Hall
 
Docker DANS workshop
Docker DANS workshopDocker DANS workshop
Docker DANS workshopvty
 
Dockercon EU 2014
Dockercon EU 2014Dockercon EU 2014
Dockercon EU 2014Rafe Colton
 
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...Docker, Inc.
 
Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...
Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...
Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...Outlyer
 
Docker for Ruby Developers
Docker for Ruby DevelopersDocker for Ruby Developers
Docker for Ruby DevelopersAptible
 
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on AzureDocker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on AzurePatrick Chanezon
 
Enabling Hybrid Workflows with Docker/Mesos @Orbitz
Enabling Hybrid Workflows with Docker/Mesos @OrbitzEnabling Hybrid Workflows with Docker/Mesos @Orbitz
Enabling Hybrid Workflows with Docker/Mesos @OrbitzSteve Hoffman
 
How to create your own hack environment
How to create your own hack environmentHow to create your own hack environment
How to create your own hack environmentSumedt Jitpukdebodin
 
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure Patrick Chanezon
 
Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with DockerPatrick Mizer
 

Similar to Dev with Docker WCPHX 2019 (20)

Architecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based DeploymentsArchitecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based Deployments
 
Docker Container As A Service - Mix-IT 2016
Docker Container As A Service - Mix-IT 2016Docker Container As A Service - Mix-IT 2016
Docker Container As A Service - Mix-IT 2016
 
[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안[Codelab 2017] Docker 기초 및 활용 방안
[Codelab 2017] Docker 기초 및 활용 방안
 
Docker for Web Developers: A Sneak Peek
Docker for Web Developers: A Sneak PeekDocker for Web Developers: A Sneak Peek
Docker for Web Developers: A Sneak Peek
 
Docker for developers on mac and windows
Docker for developers on mac and windowsDocker for developers on mac and windows
Docker for developers on mac and windows
 
Cicd.pdf
Cicd.pdfCicd.pdf
Cicd.pdf
 
From Docker to Production - ZendCon 2016
From Docker to Production - ZendCon 2016From Docker to Production - ZendCon 2016
From Docker to Production - ZendCon 2016
 
Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)Running Docker in Development & Production (DevSum 2015)
Running Docker in Development & Production (DevSum 2015)
 
Docker DANS workshop
Docker DANS workshopDocker DANS workshop
Docker DANS workshop
 
Dockercon EU 2014
Dockercon EU 2014Dockercon EU 2014
Dockercon EU 2014
 
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
 
Docker presentation
Docker presentationDocker presentation
Docker presentation
 
Pp docker-swarm-doxlon-28th-march-2017
Pp docker-swarm-doxlon-28th-march-2017Pp docker-swarm-doxlon-28th-march-2017
Pp docker-swarm-doxlon-28th-march-2017
 
Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...
Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...
Building a production-ready, fully-scalable Docker Swarm using Terraform & Pa...
 
Docker for Ruby Developers
Docker for Ruby DevelopersDocker for Ruby Developers
Docker for Ruby Developers
 
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on AzureDocker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
Docker Seattle Meetup April 2015 - The Docker Orchestration Ecosystem on Azure
 
Enabling Hybrid Workflows with Docker/Mesos @Orbitz
Enabling Hybrid Workflows with Docker/Mesos @OrbitzEnabling Hybrid Workflows with Docker/Mesos @Orbitz
Enabling Hybrid Workflows with Docker/Mesos @Orbitz
 
How to create your own hack environment
How to create your own hack environmentHow to create your own hack environment
How to create your own hack environment
 
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
Docker New York Meetup May 2015 - The Docker Orchestration Ecosystem on Azure
 
Developing and Deploying PHP with Docker
Developing and Deploying PHP with DockerDeveloping and Deploying PHP with Docker
Developing and Deploying PHP with Docker
 

More from Maura Teal

The Self Documenting Developer -- WordCamp Phoenix 2020
The Self Documenting Developer -- WordCamp Phoenix 2020The Self Documenting Developer -- WordCamp Phoenix 2020
The Self Documenting Developer -- WordCamp Phoenix 2020Maura Teal
 
Optimize All the Things WCOC 2019
Optimize All the Things WCOC 2019Optimize All the Things WCOC 2019
Optimize All the Things WCOC 2019Maura Teal
 
Balancing Act of Caching, WordCamp Europe 2018
Balancing Act of Caching, WordCamp Europe 2018Balancing Act of Caching, WordCamp Europe 2018
Balancing Act of Caching, WordCamp Europe 2018Maura Teal
 
Balancing Act of Caching LoopConf 2018
Balancing Act of Caching LoopConf 2018Balancing Act of Caching LoopConf 2018
Balancing Act of Caching LoopConf 2018Maura Teal
 
Intro to Custom Post Types WPAZ July 2015
Intro to Custom Post Types WPAZ July 2015Intro to Custom Post Types WPAZ July 2015
Intro to Custom Post Types WPAZ July 2015Maura Teal
 
Getting Started With Sass | WC Philly 2015
Getting Started With Sass | WC Philly 2015Getting Started With Sass | WC Philly 2015
Getting Started With Sass | WC Philly 2015Maura Teal
 

More from Maura Teal (6)

The Self Documenting Developer -- WordCamp Phoenix 2020
The Self Documenting Developer -- WordCamp Phoenix 2020The Self Documenting Developer -- WordCamp Phoenix 2020
The Self Documenting Developer -- WordCamp Phoenix 2020
 
Optimize All the Things WCOC 2019
Optimize All the Things WCOC 2019Optimize All the Things WCOC 2019
Optimize All the Things WCOC 2019
 
Balancing Act of Caching, WordCamp Europe 2018
Balancing Act of Caching, WordCamp Europe 2018Balancing Act of Caching, WordCamp Europe 2018
Balancing Act of Caching, WordCamp Europe 2018
 
Balancing Act of Caching LoopConf 2018
Balancing Act of Caching LoopConf 2018Balancing Act of Caching LoopConf 2018
Balancing Act of Caching LoopConf 2018
 
Intro to Custom Post Types WPAZ July 2015
Intro to Custom Post Types WPAZ July 2015Intro to Custom Post Types WPAZ July 2015
Intro to Custom Post Types WPAZ July 2015
 
Getting Started With Sass | WC Philly 2015
Getting Started With Sass | WC Philly 2015Getting Started With Sass | WC Philly 2015
Getting Started With Sass | WC Philly 2015
 

Recently uploaded

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 

Recently uploaded (20)

SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 

Dev with Docker WCPHX 2019

  • 1. @mlteal | #WCPHX | 2019 Develop With Docker Containers for everyone!
  • 2. @mlteal | #WCPHX | 2019 Maura Teal (@mlteal) Software Engineer at Pagely and NorthStack
  • 3. @mlteal | #WCPHX | 2019 Docker Docker Docker…
  • 4. @mlteal | #WCPHX | 2019 Local Development • Local machine • MAMP/WAMP/XAMPP • Vagrant • Varying Vagrant Vagrants (VVV) • ServerPress, Local by Flywheel, etc
  • 5. @mlteal | #WCPHX | 2019 What & Why? 1. https://aws.amazon.com/docker/ 2. https://www.docker.com/why-docker • “Software platform that allows you to build, test, and deploy applications quickly” • [Relatively] simple yet powerful tooling • Performance Docker Docker Docker…
  • 6. @mlteal | #WCPHX | 2019 Project Service A (Database) Image: mysql-5.7 Getting Started with Docker Service B (Webserver) Image: nginx Service C (WordPress) Image: php7.2-fpm
  • 7. @mlteal | #WCPHX | 2019 Why Docker • Consistency • Consistency • Consistency
  • 8. @mlteal | #WCPHX | 2019 Required • Docker for [your OS] • Terminal Getting Started with Docker Optional • Homebrew (MacOS/Linux) • Docker Compose
  • 9. @mlteal | #WCPHX | 2019 DockerHub Images are published to DockerHub and are downloaded and used as a quick-start for projects. Starting with an Image
  • 10. @mlteal | #WCPHX | 2019 Starting with an Image
  • 11. @mlteal | #WCPHX | 2019 Starting with a Dockerfile A Dockerfile is a text file that contains the commands a user wants to call to assemble an image. • A linux distribution • PHP Basic Platform Requirements • Apache and/or NGINX • MySQL
  • 12. @mlteal | #WCPHX | 2019 Starting with a Dockerfile FROM wordpress:php7.1-apache COPY . /var/www/html Starting with an all-in-one approach: 1. Download WP Core into a directory on your local machine 2. Create a Dockerfile in that directory with the following:
  • 13. @mlteal | #WCPHX | 2019 Starting with a Dockerfile Starting with an all-in-one approach: 🦄 :~$ cd myproject 🦄 :myproject$ docker build -t ‘my-image’ . 🦄 :myproject$ docker run --name mysql-cont -e MYSQL_ROOT_PASSWORD=qwerty -d mysql:5.7 🦄 :myproject$ docker run --name wp-cont --link mysql-cont:mysql -p 8000:80 -d my-image 🦄 :myproject$ docker stop wp-cont 3. Build the image 4. Run the mysql container 5. Run the WP container — accessed at http://localhost:8000
  • 14. @mlteal | #WCPHX | 2019 Important Commands 🦄 :~$ docker image ls 🦄 :~$ docker inspect [IMAGE TAG or ID] 🦄 :~$ docker stop [CONTAINER NAME] 🦄 :~$ docker ps # lists ALL containers and their statuses 🦄 :~$ docker ps | grep [Container ID OR Name (can be partial)] 🦄 :~$ docker exec -ti [Container ID or Name] bash Find docs and all commands at https://docs.docker.com/engine/reference/commandline/
  • 15. @mlteal | #WCPHX | 2019 A fork in the road
  • 16. @mlteal | #WCPHX | 2019 Enter: Docker Compose
  • 17. @mlteal | #WCPHX | 2019 Docker Compose docker-compose.yml defines container configuration & links @mlteal | #WCPHX | 2019
  • 18. @mlteal | #WCPHX | 2019@mlteal | #WCPHX | 2019
  • 19. @mlteal | #WCPHX | 2019 Docker Compose 🦄 :~$ cd myproject 🦄 :myproject$ docker-compose up … 🦄 :myproject$ docker-compose down 1. Build and run your app with compose:
  • 21. @mlteal | #WCPHX | 2019 • Hostname handling
 (use dnsmasq/proxy) • SSL certs for local dev • Local Email handling Handling Details https://github.com/10up/wp-local-docker-v2
  • 22. @mlteal | #WCPHX | 2019 Handling Details (Lando)
  • 23. @mlteal | #WCPHX | 2019 • DockerHub
 https://hub.docker.com/ • Docker Compose Docs
 https://docs.docker.com/compose/ • Lando
 https://docs.devwithlando.io/ Moar Resources
  • 25. @mlteal | #WCPHX | 2019 Maura Teal @mlteal