DOCKER
DOCKER
Docker is an OS virtualized software platform that allows IT organizations to easily create, deploy, and run applications in Docker containers, which have all the dependencies within them. The container itself is really just a very lightweight package that has all the instructions and dependencies—such as frameworks, libraries, and bins—within it.
Docker has a
central repository of disk images (public and private) that allow you to easily
run different operating systems (Ubuntu, Centos, Fedora, even Gentoo).
Containers : A standard package of software is known as
containers and it contain all of necessary elements to run in any environment.
It can virtually package and isolate application for deployment to allow
greater scalability, availability and portability.
When To Use
Docker?
Docker is a basic tool, like git or java, that you should start incorporating into your daily development and ops practices.
- Use Docker as version control system for your entire app's operating system
- Use Docker when you want to distribute/collaborate on your app's operating system with a team
- Use Docker to run your code on your laptop in the same environment as you have on your server (try the building tool)
- Use Docker whenever your app needs to go through multiple phases of development (dev/test/qa/prod, try Drone or Shippable, both do Docker CI/CD)
- Use Docker with your Chef Cookbooks and Puppet Manifests (remember, Docker doesn't do configuration management).
Why Is Docker So Useful?
- Docker takes the same kind of version control and packaging that tools like Git and NPM provide and allows you to use it for your server software. Since your container is a single image, it makes it very easy to version track different builds of your container. And since everything is contained, it makes managing all of your dependencies much easier.
- With Docker, your development environment will be exactly the same as your production environment, and exactly the same as everyone else’s development environment, alleviating the problem of “it’s broken on my machine!”
- If you wanted to add another server to your cluster, you wouldn’t have to worry about reconfiguring that server and reinstalling all the dependencies you need. Once you build a container, you can share the container file with anyone, and they could easily have your app up and running with a few commands. Docker makes running multiple servers very easy, especially with orchestration engines like Kubernetes and Docker Swarm.
- Docker also allows you to organize your code for deploying on new services. Let’s say you have a web server that you’re using for your application. You likely have a lot of stuff installed on that server, you’ve got an nginx web server for hosting static content, you’ve probably got a database for storing some stuff on the backend, maybe you have an API server running on Express.js as well. Ideally you’d split these up into separate applications to run on separate servers, but development can get messy.
- Docker can also save you money if you’d like to run multiple apps on a single VPS. If each app has different dependencies, it’s very easy for your server to become cluttered, like a Thanks giving dinner plate with everything mixing together. With Docker, you can run multiple separate containers with, for example, seperate versions of PHP, like a high school lunch tray with everything separated.