What is Dockerfile?

A warm Hello to all the readers! This is yet another article to understand a new concept of Docker. There is a special file called as Dockerfile. What is Dockerfile? Dockerfile is a file that contains instructions to build an image. Instructions are a series of commands that you will otherwise run in running container…

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…