Sneak view into Docker for Web devs | Part-1

  • Team A has engineers who want to develop software on Mac OSX. However their application in production is going to run on Ubuntu 16 with JDK 1.7 and Tomcat 7, but QA team doesn’t likes the idea of shipping softwares, which are developed on Mac OSX and tested on Ubuntu.
  • Team B on the other hand wants to upgrade JDK to 1.8 and Tomcat 8 in QA environment, to test their app.
  • The infrastructure or the server sits on the bottom.
  • On top of the infrastructure, the host operating system is installed. Now, it could be Windows Mac OSX, Linux etc.
  • On top of this, sits the docker-engine and the docker-engine is responsible for spawning various containers. So, all this docker engine is doing is to spawn multiple containers.
  • Processing ability.
  • Memory.
  • Volumes mounted to the OS.
What is Docker ?
  • First Container runs on the port 80 hosted on Tomcat-7 and JDK 1.7.
  • Second Container runs on the port 80 hosted on Tomcat-8 and JDK 1.8.
Hosting multiple environments on same hardware
  • Team-A installs docker on their local MacOSX and develops software using JDK 1.7 and Tomcat-7 and this environment is going to be consistent across all the environments.
  • Team B gets to use JDK 1.8 and Tomcat-8 even though they share the servers with Team A.
  • QA on the other hand is happy, as they get to test an application which was developed using the same OS (as that of prod).
docker version command output
docker preferences
docker run -it hello-world
docker-compose version
Yay ! our website is accessible from within the container now.
Installed “procps” package into the Container.
Note the PID as 1.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store