How to understand downloading images with docker-compose

Zhao Li
Analytics Vidhya
Published in
3 min readJun 9, 2019

--

cc:https://www.flickr.com/photos/appleboy/22947137613

Problem

Before you can use any Docker container, you first need to download a Docker image on to your local development machine.

Solution

This tutorial will go through how to download a Docker image from Docker Hub on to your local development machine and then understand what happened.

Here are the steps we will take:

  1. declare which Docker image we want to download in a docker-compose.yml file
  2. download the Docker image using docker-compose.yml

This diagram shows what is happening behind the scenes:

Front Matter

This tutorial assumes you’ve installed docker and docker-compose. You can verify that it is working by checking their versions.

$ docker -v
Docker version 18.06.1-ce, build e68fc7a
$ docker-compose -v
docker-compose version 1.22.0, build f46880f

--

--