Docker Image Layers

Hello to all the readers! Docker image is built in layers. Each instruction that is written in Dockerfile translates into an image layer by the builder. When the image is re-built, builder will re-use layers from earlier builds. If any layer is unchanged, then that layer is picked up from the build cache. However, if…

What is Alpine Image?

Hello to all the readers! While I was learning Docker, I could see that in most of the places, alpine image of Node.js or Golang is used. Therefore, I went and studied what is an alpine image. The alpine docker image is based on Alpine linux. It is a very small, minimal image with complete…

Using Docker Compose

Hello to all the readers! I have setup multi container applications separate using docker run commands. But docker offers a nice way to setup multi container apps using Docker compose. Here we define each service in a docker-compose.yml file and then a single command spins up everything for us. The docker-compose.yml for mysql and app…

Bind Mounts in Docker

Hello to all the readers! There is another concept of bind mounts in docker that allows to share the host machine directory inside docker. The contents changed on the host machine or inside docker are reflected on both sides. Here is how to use a bind mount. Now if we make changes in this directory…

Creating Volume in Docker

Hello to all the readers! Any data that is generated inside a container by operations is lost once container is stopped. Therefore in order to persist the data in a container, volumes are created and attached to the container. Now we will run a container created out of getting-started image and mount the volume to…

Creating Docker Image

Hello to all the readers! In this post I will be creating a docker image out of the simple tutorial posted on Docker’s documentation. Let us begin with the steps. Clone the repository Create Dockerfile. Dockerfile is a set of instructions to build the docker image. Next is to build the image. This builds the…

Docker Concepts

Hello to all the readers! I am writing down about my learnings on docker. I have learnt docker in the past and used it but never thought to document my learning. I think it is very good to document our own learning of a subject that helps me and maybe you to understand it in…