Docker Tutorial 2: Pulling Image

Sik-Ho Tsang
2 min readJul 6, 2018

--

After installed the docker, we can try to pull image from Docker hub, which is the step 1 of the image below, which including:

  1. search images
  2. pull images
  3. display images
  4. save images
  5. load images
  6. remove images

(Sik-Ho Tsang @ Medium)

Docker flow (from https://denibertovic.com/talks/supercharge-development-env-using-docker)
  1. We can search the docker repository from the Docker hub.
sudo docker search ubuntu

2. Use pull command to pull the image ubuntu:18.04. We can see that a new image is downloaded showing pull complete.

sudo docker pull ubuntu:18.04

3. We can display all the images pulled by images:

sudo docker images

4. We can save the image as tar file.

sudo docker save -o ubuntu.18.04.tar ubuntu:18.04

5. Certainly, we can load the image from tar file.

sudo docker load --input ubuntu.18.04.tar

6. And remove the image by rmi.

sudo docker rmi ubuntu:18.04

Thus, these are some basic commands for pulling images. :)

References

SUPERCHARGE YOUR DEVELOPMENT ENVIRONMENT https://denibertovic.com/talks/supercharge-development-env-using-docker

Day 4 關於 Image 的那些大小事https://ithelp.ithome.com.tw/articles/10193334

--

--

Sik-Ho Tsang
Sik-Ho Tsang

Written by Sik-Ho Tsang

PhD, Researcher. I share what I learn. :) Linktree: https://linktr.ee/shtsang for Twitter, LinkedIn, etc.

No responses yet