Shell Script 문법 정리
Title: Bash Shell Script 문법 정리 Author: DongDongE Tags: Programming Release: 2021.02.08 [Shell
Docker Hub에 존재하는 이미지를 다운로드 해보자.!! 명령은 아래와 같습니다.
docker image pull <이미지명>:<태그 명>만약 위 명령어에서 이미지명과 태그명이 구별안된다면 이전 Docker Search 부분을 참조하시면 됩니당!!
dongdonge@dongdonge$ sudo docker image --help
Usage:  docker image COMMAND
Manage images
Commands:
  build       Build an image from a Dockerfile
  history     Show the history of an image
  import      Import the contents from a tarball to create a filesystem image
  inspect     Display detailed information on one or more images
  load        Load an image from a tar archive or STDIN
  ls          List images
  prune       Remove unused images
  pull        Pull an image or a repository from a registry
  push        Push an image or a repository to a registry
  rm          Remove one or more images
  save        Save one or more images to a tar archive (streamed to STDOUT by default)
  tag         Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
Run 'docker image COMMAND --help' for more information on a command.
Docker image 관련 옵션은 위와 같이 볼 수 있으며, 몇개만 확인해보도록 하겠습니당.
Docker 공식 이미지인 Ubuntu의 16.04를 다운로드 하기 위해 아래 명령을 입력하면 됩니다.
dongdonge@dongdonge$ sudo docker image pull ubuntu:16.04
16.04: Pulling from library/ubuntu
9ff7e2e5f967: Pull complete
59856638ac9f: Pull complete
6f317d6d954b: Pull complete
a9dde5e2a643: Pull complete
Digest: sha256:cad5e101ab30bb7f7698b277dd49090f520fe063335643990ce8fbd15ff920ef
Status: Downloaded newer image for ubuntu:16.04
image pull <이미지명>:<태그명> 를 사용하여 정확한 버전의 이미지를 다운로드할 수 있다.
dongdonge@dongdonge$ sudo docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
ubuntu              16.04               2a697363a870        4 weeks ago         119MB
docker images 명령을 통해 다운로드 받은 이미지 목록을 확인할 수 있습니다. 또한 이미지 ID 및 Tag 번호, 이미지 사이즈 등. 확인할 수 있습니다.