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…