Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Building Reusable Development
Environments with Docker
Harold Dost
Raastech, Inc.
CC BY 3.0 US, Harold A. Dost III 1
About Me
Harold Dost (@hdost)
7+ years of Oracle Middleware
experience
OCE (SOA Foundation Practitioner)
Oracle ACE Associ...
About Raastech
» Small systems integrator founded in 2009
» Headquartered in the Washington DC area
» Specializes in Oracl...
Docker
CC BY 3.0 US, Harold A. Dost III 4
The Docker Ecosystem
CC BY 3.0 US, Harold A. Dost III 5
Tools
» Docker Machine
» Docker Engine
» Docker Compose
» Docker Registry
CC BY 3.0 US, Harold A. Dost III 6
Docker Machine
» This aids in creating docker hosts
» The target of these can be:
» Cloud Providers
» AWS
» Digital Ocean
...
Docker Machine cont.
» Other VM Targets
» OpenStack
» Oracle VirtualBox
» VMware Fusion®
» vCloud® Air™
» vSphere®
CC BY 3...
Docker Machine
Creates a dummy machine
docker-machine create --driver virtualbox default
CC BY 3.0 US, Harold A. Dost III 9
Docker Engine
» The basis of the whole docker eco system
» Responsible for handling all interactions between the
container...
Using Docker Engine
» 39 Different commands
» Only covering some of the most used
CC BY 3.0 US, Harold A. Dost III 11
Commands: Retrieve
pull - Pull an image or a repository from a registry
CC BY 3.0 US, Harold A. Dost III 12
Commands: Create and Delete
create - Create a new container
rm - Remove one or more containers
rmi - Remove one or more im...
Commands: Start and Stop
start - Start 1+ stopped containers
stop - Stop a running container
exec - Run command in running...
Commands: Organize
rename - Rename a container
tag - Tag an image into a repository
commit - Create a new image from a con...
Commands: Etc.
cp - Copy files to and from containers
port - List port mappings
ps - List containers
attach - Attach to a r...
Dockerfile 1
FROM java:8
RUN apt-get update
RUN apt-get install -y maven nodejs
EXPOSE 9000
WORKDIR /app
COPY app /app
RUN...
Docker Compose
» Create Multi-container Applications
» Example:
» Java App
» Database
CC BY 3.0 US, Harold A. Dost III 18
Docker Compose
» Uses decriptor file compose.yml
» Brings up an application
CC BY 3.0 US, Harold A. Dost III 19
Docker Compose Commands
build - Build or rebuild services
kill - Kill containers
up - Create and start containers
migrate-...
The docker-compose.yml 1
web:
build: .
links:
- db
ports:
- "8000:8000"
db:
image: postgres
1
For more information about f...
MAVEN Plugins
» https://github.com/spotify/docker-maven-plugin
» https://github.com/rhuss/docker-maven-plugin
» https://gi...
Real world Demo
CC BY 3.0 US, Harold A. Dost III 23
Using Docker Machine
CC BY 3.0 US, Harold A. Dost III 24
Using Docker Engine
CC BY 3.0 US, Harold A. Dost III 25
Running Composed
Docker Containers
CC BY 3.0 US, Harold A. Dost III 26
Perform Tests
CC BY 3.0 US, Harold A. Dost III 27
Combining Docker
with CI
CC BY 3.0 US, Harold A. Dost III 28
Questions?
CC BY 3.0 US, Harold A. Dost III 29
Upcoming SlideShare
Loading in …5
×

Building Reusable Development Environments with Docker

5,559 views

Published on

Docker is a relatively new technology, but it is based on solid underpinnings of the Linux Kernel. It can provision instances in a fraction of the time versus a traditional virtual machine. This makes it a great candidate for development teams to create consistent test benches for their developers. To set up your own disposable Docker environments bring a laptop and make your development a pleasurable experience.

Published in: Technology
  • Be the first to comment

Building Reusable Development Environments with Docker

  1. 1. Building Reusable Development Environments with Docker Harold Dost Raastech, Inc. CC BY 3.0 US, Harold A. Dost III 1
  2. 2. About Me Harold Dost (@hdost) 7+ years of Oracle Middleware experience OCE (SOA Foundation Practitioner) Oracle ACE Associate From Michigan blog.raastech.com CC BY 3.0 US, Harold A. Dost III 2
  3. 3. About Raastech » Small systems integrator founded in 2009 » Headquartered in the Washington DC area » Specializes in Oracle Fusion Middleware » Oracle Platinum Partner & Reseller » Oracle SOA Specialized – 1 in 1,500 worldwide » Oracle Platinum Partner – 1 in 3,000 worldwide CC BY 3.0 US, Harold A. Dost III 3
  4. 4. Docker CC BY 3.0 US, Harold A. Dost III 4
  5. 5. The Docker Ecosystem CC BY 3.0 US, Harold A. Dost III 5
  6. 6. Tools » Docker Machine » Docker Engine » Docker Compose » Docker Registry CC BY 3.0 US, Harold A. Dost III 6
  7. 7. Docker Machine » This aids in creating docker hosts » The target of these can be: » Cloud Providers » AWS » Digital Ocean » Google Cloud Platform » Microsoft Azure and Hyper-V CC BY 3.0 US, Harold A. Dost III 7
  8. 8. Docker Machine cont. » Other VM Targets » OpenStack » Oracle VirtualBox » VMware Fusion® » vCloud® Air™ » vSphere® CC BY 3.0 US, Harold A. Dost III 8
  9. 9. Docker Machine Creates a dummy machine docker-machine create --driver virtualbox default CC BY 3.0 US, Harold A. Dost III 9
  10. 10. Docker Engine » The basis of the whole docker eco system » Responsible for handling all interactions between the containers and the base operating system CC BY 3.0 US, Harold A. Dost III 10
  11. 11. Using Docker Engine » 39 Different commands » Only covering some of the most used CC BY 3.0 US, Harold A. Dost III 11
  12. 12. Commands: Retrieve pull - Pull an image or a repository from a registry CC BY 3.0 US, Harold A. Dost III 12
  13. 13. Commands: Create and Delete create - Create a new container rm - Remove one or more containers rmi - Remove one or more images CC BY 3.0 US, Harold A. Dost III 13
  14. 14. Commands: Start and Stop start - Start 1+ stopped containers stop - Stop a running container exec - Run command in running container run - Run command in new container kill - Kill a running container restart - Restart a running container CC BY 3.0 US, Harold A. Dost III 14
  15. 15. Commands: Organize rename - Rename a container tag - Tag an image into a repository commit - Create a new image from a container's changes CC BY 3.0 US, Harold A. Dost III 15
  16. 16. Commands: Etc. cp - Copy files to and from containers port - List port mappings ps - List containers attach - Attach to a running container CC BY 3.0 US, Harold A. Dost III 16
  17. 17. Dockerfile 1 FROM java:8 RUN apt-get update RUN apt-get install -y maven nodejs EXPOSE 9000 WORKDIR /app COPY app /app RUN chown -R appuser /app USER appuser ENTRYPOINT mvn spring-boot:run 1 For more information about file arguments check here. CC BY 3.0 US, Harold A. Dost III 17
  18. 18. Docker Compose » Create Multi-container Applications » Example: » Java App » Database CC BY 3.0 US, Harold A. Dost III 18
  19. 19. Docker Compose » Uses decriptor file compose.yml » Brings up an application CC BY 3.0 US, Harold A. Dost III 19
  20. 20. Docker Compose Commands build - Build or rebuild services kill - Kill containers up - Create and start containers migrate-to-labels - Recreate containers to add labels version - Show the Docker-Compose version information CC BY 3.0 US, Harold A. Dost III 20
  21. 21. The docker-compose.yml 1 web: build: . links: - db ports: - "8000:8000" db: image: postgres 1 For more information about file arguments check here. CC BY 3.0 US, Harold A. Dost III 21
  22. 22. MAVEN Plugins » https://github.com/spotify/docker-maven-plugin » https://github.com/rhuss/docker-maven-plugin » https://github.com/wouterd/docker-maven-plugin CC BY 3.0 US, Harold A. Dost III 22
  23. 23. Real world Demo CC BY 3.0 US, Harold A. Dost III 23
  24. 24. Using Docker Machine CC BY 3.0 US, Harold A. Dost III 24
  25. 25. Using Docker Engine CC BY 3.0 US, Harold A. Dost III 25
  26. 26. Running Composed Docker Containers CC BY 3.0 US, Harold A. Dost III 26
  27. 27. Perform Tests CC BY 3.0 US, Harold A. Dost III 27
  28. 28. Combining Docker with CI CC BY 3.0 US, Harold A. Dost III 28
  29. 29. Questions? CC BY 3.0 US, Harold A. Dost III 29

×