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

281 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

  • Be the first to like this

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 » Founded in 2009 » Washington DC area » Specializes in Oracle Fusion Middleware » Oracle Platinum Partner » 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 » Basis of Eco-system » Mediate between containers and host CC BY 3.0 US, Harold A. Dost III 10
  11. 11. Benefits » Lightweight » Walled off from other process » Repeatable CC BY 3.0 US, Harold A. Dost III 11
  12. 12. Limitations » Linux Kernel Based OS (Ubuntu, CentOS, Arch, Etc.) » Minimum of Kernel 3.10 CC BY 3.0 US, Harold A. Dost III 12
  13. 13. How does Docker work? » Control Groups: Limit Resources of Process Groups » Kernel Namespaces: Isolates resources CC BY 3.0 US, Harold A. Dost III 13
  14. 14. Definitions » Images » VM » Docker » Container CC BY 3.0 US, Harold A. Dost III 14
  15. 15. Difference between Containers and VMs 2 2 Image Source: http://www.docker.com/what-docker CC BY 3.0 US, Harold A. Dost III 15
  16. 16. 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 the Dockerfile format check here. CC BY 3.0 US, Harold A. Dost III 16
  17. 17. Using Docker Engine » 39 Different commands » Only covering some of the most used CC BY 3.0 US, Harold A. Dost III 17
  18. 18. Commands: Retrieve pull - Pull an image or a repository from a registry CC BY 3.0 US, Harold A. Dost III 18
  19. 19. 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 19
  20. 20. 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 20
  21. 21. 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 21
  22. 22. 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 22
  23. 23. Docker Compose » Create Multi-container Applications » Example: » Java App » Database CC BY 3.0 US, Harold A. Dost III 23
  24. 24. Docker Compose » Uses decriptor file compose.yml » Brings up an application CC BY 3.0 US, Harold A. Dost III 24
  25. 25. 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 25
  26. 26. The docker-compose.yml 3 web: build: . links: - db ports: - "8000:8000" db: image: postgres 3 For more information about file arguments check here. CC BY 3.0 US, Harold A. Dost III 26
  27. 27. 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 27
  28. 28. Real world Demo CC BY 3.0 US, Harold A. Dost III 28
  29. 29. Using Docker Machine CC BY 3.0 US, Harold A. Dost III 29
  30. 30. Using Docker Engine CC BY 3.0 US, Harold A. Dost III 30
  31. 31. Running Composed Docker Containers CC BY 3.0 US, Harold A. Dost III 31
  32. 32. Perform Tests CC BY 3.0 US, Harold A. Dost III 32
  33. 33. Questions? CC BY 3.0 US, Harold A. Dost III 33
  34. 34. Contact » Harold Dost » @hdost » harold.dost@raastech.com CC BY 3.0 US, Harold A. Dost III 34

×