The Art of Shipping Software
The core of Docker and its success is in its ability to solve the long-standing problem of Shipping Software. As we saw in the introductory video, deploying software involved a lot of “It works on my machine” There was no concrete way to ship software and its associated packages and libraries until then.
So repeat after me
Docker lets you packages application and their associated packages and libraries that can run anywhere without hassle.
Docker image is a file. It contains a set of instructions to construct Docker containers and run them. Docker images solve the shipping part of the software. You have to build a docker image file, and it can run in any Dockerized environment.
Containers are actual running instances of an image. Each docker container runs the program built into the image in its isolated environment, enabling us to run multiple Docker containers into the same machine.
Every time you think of Dockerizing, an application creates a Dockerfile. In the Dockerfile, we will use the basic docker commands to build and deploy the application. You can think of Dockerfile as a Lego block instruction manual properly laid out that lets us build the end structure without much hassle.
The Docker Registry is a centralized repository to store and retrieve built Docker images. You can think of registries as a Github for Docker images. Registries can be public like Dockerhub or private like your company runs.
Using Docker, you will often use these commands maps to common Docker functions.
- Create an image —
- Pull an image from the registry —
- Push an image —
- Run a container —
docker run <image-id>
- Stop a container —
docker stop <container-id>
How to Dockerize an Application
Continue reading at bhavaniravi.com