Skip to content

Latest commit

ย 

History

History
680 lines (511 loc) ยท 19.7 KB

docker_commands.md

File metadata and controls

680 lines (511 loc) ยท 19.7 KB

Docker Commands

๋„์ปค์˜ ๋ช…๋ น์–ด ๋ชจ์Œ

Basic Commands Sytax

docker <option> <command> <ARG...>
  • option | ์˜ต์…˜
  • command | ๋ช…๋ น
  • ARG... | ๋งค๊ฐœ๋ณ€์ˆ˜

Table of Contents

๋งํฌ๋ฅผ ํด๋ฆญํ•˜์—ฌ ์ด๋™
| attach | build | commit | cp | create | diff | events | exec | export | history | images | import | info | inpect | kill | load | login | logout | logs | pause | port | ps | pull | push | rename | restart | rm | rmi | run | save | search | start | stats | stop | tag | top | unpause | update | version | wait |

A

attach

Attach local standard input, output, and error streams to a running container.
์‹คํ–‰๋˜๊ณ  ์žˆ๋Š” ์ปจํ…Œ์ด๋„ˆ์— ์ž…๋ ฅ(stdin)๊ณผ ์ถœ๋ ฅ(stdout)์„ ์—ฐ๊ฒฐํ•˜๋Š” ๋ช…๋ น์–ด.

  • Syntax
    docker attach <option> <containerName, ID>

โ†‘ return to TOC

B

build

Build an image from a Dockerfile
Dockerfile๋กœ image๋ฅผ ์ƒ์„ฑํ•˜๋Š” ๋ช…๋ น์–ด.

  • syntax

    docker build <option> <dockerfile Path>
  • Local path ์™€ URL ์‚ฌ์šฉ ๊ฐ€๋Šฅ

  • Dockerfile ์ด ์žˆ๋Š” ๊ฒฝ๋กœ์—์„œ build ๋ช…๋ น์„ ์‹คํ–‰

โ†‘ return to TOC

C

commit

Create a new image from a container's changes.
์ปจํ…Œ์ด๋„ˆ์˜ ๋ณ€๊ฒฝ ์‚ฌํ•ญ์„ ์ด๋ฏธ์ง€๋กœ ์ƒ์„ฑํ•˜๋Š” ๋ช…๋ น์–ด.

  • Syntax
    docker commit <option> <containerName, ID> <repositoryName>/<imageName>:<tag>

โ†‘ return to TOC

cp

Copy files/folders between a container and the local filesystem.
์ปจํ…Œ์ด๋„ˆ์˜ Directory/files์„ host๋กœ ๋ณต์‚ฌํ•˜๋Š” ๋ช…๋ น์–ด.

  • Syntax
    docekr cp <containerName>:<path> <hostPath>

โ†‘ return to TOC

create

Create a new container.
Image๋กœ ์ปจํ…Œ์ด๋„ˆ๋ฅผ ์ƒ์„ฑํ•˜๋Š” ๋ช…๋ น์–ด.

  • Syntax
    docker create <option> <imageName, ID> <command> <ARG...>

โ†‘ return to TOC

D

diff

Inspect changes to files or directories on a container's filesystem.
์ปจํ…Œ์ด๋„ˆ์—์„œ ๋ณ€๊ฒฝ๋œ file์„ ํ™•์ธํ•˜๋Š” ๋ช…๋ น์–ด.

  • Syntax

    docker diff <containerName, ID>
    • ๋ณ€๊ฒฝ๋œ ํŒŒ์ผ ๋น„๊ต ๊ธฐ์ค€ --> ์ปจํ…Œ์ด๋„ˆ๋ฅผ ์ƒ์„ฑํ•œ ์ด๋ฏธ์ง€์˜ ๋‚ด์šฉ

โ†‘ return to TOC

E

events

Get real time events from the server.
Docker ์„œ๋ฒ„์— ์ผ์–ด๋‚œ event๋ฅผ ์‹ค์‹œ๊ฐ„์œผ๋กœ ์ถœ๋ ฅํ•˜๋Š” ๋ช…๋ น์–ด.

  • Syntax

    docker events
    • ํ•ด๋‹น ๋ช…๋ น์–ด๋ฅผ ์‹คํ–‰ํ•˜๊ฒŒ ๋˜๋ฉด docker๋Š” ๋Œ€๊ธฐ ์ƒํƒœ๊ฐ€ ๋œ๋‹ค.

โ†‘ return to TOC

exec

Run a command in a running container.
์™ธ๋ถ€์—์„œ ์ปจํ…Œ์ด๋„ˆ ์•ˆ์˜ ๋ช…๋ น์„ ์‹คํ–‰ํ•˜๋Š” ๋ช…๋ น์–ด.

  • Syntax
    docker export <option> <containerName, ID> <command> <ARG...>

โ†‘ return to TOC

export

Export a container's filesystem as a tar archive.
์ปจํƒœ์ด๋„ˆ์˜ filesystem์„ tar ํŒŒ์ผ๋กœ ์ €์žฅํ•˜๋Š” ๋ช…๋ น์–ด.

  • Syntax

    docker export <containerName, ID>
    • ์ปจํ…Œ์ด๋„ˆ์˜ ๋‚ด์šฉ์ด ํ‘œ์ค€ ์ถœ๋ ฅ์œผ๋กœ ์ถœ๋ ฅ๋œ๋‹ค.

โ†‘ return to TOC

H

history

Show the history of an image.
Image์˜ history๋ฅผ ์ถœ๋ ฅํ•˜๋Š” ๋ช…๋ น์–ด.

  • Syntax

    docker history <option> <imageName, ID>
    • CREATED BY: ๊ฐ๊ฐ์˜ Image Layer ๊ฐ€ ์–ด๋–ค ๋ช…๋ น์–ด๋ฅผ ํ†ตํ•ด ์ƒ์„ฑ๋ฌ๋Š”์ง€ ํ‘œ์‹œ.

    • SIZE: Image ๋””์Šคํฌ ํฌ๊ธฐ.

      IMAGE          CREATED         CREATED BY                                      SIZE      COMMENT
      a617c1c92774   18 months ago   /bin/sh -c #(nop)  CMD ["redis-server"]         0B
      <missing>      18 months ago   /bin/sh -c #(nop)  EXPOSE 6379                  0B
      <missing>      18 months ago   /bin/sh -c #(nop)  ENTRYPOINT ["docker-entryโ€ฆ   0B
      <missing>      18 months ago   /bin/sh -c #(nop) COPY file:df205a0ef6e6df89โ€ฆ   374B
      <missing>      18 months ago   /bin/sh -c #(nop) WORKDIR /data                 0B
      <missing>      18 months ago   /bin/sh -c #(nop)  VOLUME [/data]               0B
      <missing>      18 months ago   /bin/sh -c mkdir /data && chown redis:redis โ€ฆ   0B
      <missing>      18 months ago   /bin/sh -c set -eux;   savedAptMark="$(apt-mโ€ฆ   31.6MB
      <missing>      18 months ago   /bin/sh -c #(nop)  ENV REDIS_DOWNLOAD_SHA=cdโ€ฆ   0B
      <missing>      18 months ago   /bin/sh -c #(nop)  ENV REDIS_DOWNLOAD_URL=htโ€ฆ   0B
      <missing>      18 months ago   /bin/sh -c #(nop)  ENV REDIS_VERSION=6.2.1      0B
      <missing>      18 months ago   /bin/sh -c set -eux;  savedAptMark="$(apt-maโ€ฆ   4.15MB
      <missing>      18 months ago   /bin/sh -c #(nop)  ENV GOSU_VERSION=1.12        0B
      <missing>      18 months ago   /bin/sh -c groupadd -r -g 999 redis && useraโ€ฆ   329kB
      <missing>      18 months ago   /bin/sh -c #(nop)  CMD ["bash"]                 0B
      <missing>      18 months ago   /bin/sh -c #(nop) ADD file:3c32f1cd03198e141โ€ฆ   69.2MB
      

โ†‘ return to TOC

I

images

List images.
Image์˜ ๋ชฉ๋ก์„ ์ถœ๋ ฅํ•˜๋Š” ๋ช…๋ น์–ด.

  • Syntax

    docker images <option> <imageName>
    • ์ตœ์‹  ๋‹ค์šด๋กœ๋“œ๋œ Docker Image ๊ธฐ์ค€์œผ๋กœ ์ด๋ฏธ์ง€๋ฅผ ํฌ๋ฉงํŒ… ๋ฐ ์ •๋ ฌ.
      docker images --format "table {{.ID}}\t{{.Repository}}\t{{.Tag}}\t{{.CreatedAt}}" --filter "dangling=false" | tail -n +2 | sort -k4 -r
      • --filter "dangling=false": ์“ธ๋ชจ์—†๋Š”(dangling) ์ด๋ฏธ์ง€๋ฅผ ํ•„ํ„ฐ๋งํ•˜์—ฌ ์ถœ๋ ฅ์—์„œ ์ œ์™ธ
      • tail -n +2: ํ…Œ์ด๋ธ”์˜ ํ—ค๋” ์ œ์™ธ (์ฒซ๋ฒˆ์งธ ์ค„ ์ œ์™ธํ•œ ๋‚˜๋จธ์ง€ ์ถœ๋ ฅ)
      • sort -k4 -r:
        • -k4: ๋„ค ๋ฒˆ์งธ ์—ด(CreatedAt)์„ ๊ธฐ์ค€์œผ๋กœ ์ •๋ ฌ
        • -r: ์—ญ์ˆœ์œผ๋กœ ์ •๋ ฌ

โ†‘ return to TOC

import

Import the contents from a tarball to create a filesystem image.
tar file๋กœ ์••์ถ•๋œ filesystem์œผ๋กœ๋ถ€ํ„ฐ image๋ฅผ ์ƒ์„ฑํ•˜๋Š” ๋ช…๋ น์–ด.

  • Syntax
    docker import <tar file's URL or-> <repositoryName>/<imageName>:<tag>

โ†‘ return to TOC

info

Display system-wide information.
์‹œ์Šคํ…œ, Docker Container, Image rotn, setting ๋“ฑ์˜ info๋ฅผ ์ถœ๋ ฅํ•˜๋Š” ๋ช…๋ น์–ด.

  • Syntax
    docker info

โ†‘ return to TOC

inspect

Return low-level information on Docker objects.
container, image์˜ ์„ธ๋ถ€ ์ •๋ณด๋ฅผ JSON ํ˜•ํƒœ๋กœ ์ถœ๋ ฅํ•˜๋Š” ๋ช…๋ น์–ด.

  • Syntax
    docker inspect <option> <containerName of imageName, ID>

Inspect Volume

  • Syntax
    docker volume inspect <volumeName>
    [
      {
          "CreatedAt": "2020-05-05T19:48:06Z",
          "Driver": "local",
          "Labels": null,
          "Mountpoint": "/var/lib/docker/volumes/f3c60a00000a6b207a0000aaa000f00000000af0fed1e4c5a184d9aaaa0cb5e0/_data",
          "Name": "f3c60a00000a6b207a0000aaa000f00000000af0fed1e4c5a184d9aaaa0cb5e0",
          "Options": null,
          "Scope": "local"
      }
    ]
    

โ†‘ return to TOC

K

kill

Kill one or more running containers.
์ปจํ…Œ์ด๋„ˆ๋ฅผ ์ค‘์ง€ํ•˜๋Š” ๋ช…๋ น์–ด.

  • Syntax
    docker kill <option> <containerName, ID>

โ†‘ return to TOC

L

load

Load an image from a tar archive or STDIN.
tar file๋กœ image๋ฅผ ์ƒ์„ฑํ•˜๋Š” ๋ช…๋ น์–ด.

  • Syntax

    docker load <option>
    • tar file์€ image ์ด๋ฆ„๊ณผ ํƒœ๊ทธ๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ๋‹ค.

โ†‘ return to TOC

login

Log in to a Docker registry.
Docker ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ์— ๋กœ๊ทธ์ธ ํ•˜๋Š” ๋ช…๋ น์–ด.

  • Syntax

    docker login <option> <dockerRegistryURL>
    $ docker login https://index.docker.io/v1 
  • Options

    • -u, --username
      ์‚ฌ์šฉ์ž๋ช…

    • -p, --password
      ๋น„๋ฐ€๋ฒˆํ˜ธ

    • --password-stdin ํŒŒ์ผ์„ ํ†ตํ•œ ๋น„๋ฐ€๋ฒˆํ˜ธ input. Shell ํžˆ์Šคํ† ๋ฆฌ์— password ์ž…๋ ฅํ•œ ๊ธฐ๋ก์„ ๋‚จ๊ธฐ์ง€ ์•Š๊ธฐ ์œ„ํ•ด ํŒŒ์ผ์— ๋ฏธ๋ฆฌ ์ž…๋ ฅ๋˜ ์žˆ๋Š” ๋น„๋ฐ€๋ฒˆํ˜ธ๋ฅผ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค.

      $ cat ~/docker_pw.txt | docker login --username 8luebottle --password-stdin

โ†‘ return to TOC

logout

Log out from a Docker registry.
Docker ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ์—์„œ ๋กœ๊ทธ์•„์›ƒ ํ•˜๋Š” ๋ช…๋ น์–ด.

  • Syntax
    docker logout <dockerRegistryServerURL>

โ†‘ return to TOC

logs

Fetch the logs of a container.
์ปจํ…Œ์ด๋„ˆ์˜ log๋ฅผ ์ถœ๋ ฅํ•˜๋Š” ๋ช…๋ น์–ด.

  • Syntax
    docker logs <containerName, ID>

โ†‘ return to TOC

P

pause

Pause all processes within one or more containers.
์ปจํ…Œ์ด๋„ˆ์—์„œ ์‹คํ–‰๋˜๊ณ  ์žˆ๋Š” ๋ชจ๋“  processes๋ฅผ ์ผ์‹œ ์ •์ง€ํ•˜๋Š” ๋ช…๋ น์–ด.

  • Syntax
    docker pause <containerName, ID>

โ†‘ return to TOC

port

List port mappings or a specific mapping for the container.
์ปจํ…Œ์ด๋„ˆ์—์„œ port๊ฐ€ ์—ด๋ ค ์žˆ๋Š”์ง€ ํ™•์ธํ•˜๋Š” ๋ช…๋ น์–ด.

  • Syntax
    docker port <containerName, ID> <port>

โ†‘ return to TOC

ps

PS : Process Status

List containers.
ํ˜„์žฌ ์‹คํ–‰์ค‘์ธ ์ปจํ…Œ์ด๋„ˆ์˜ ๋ชฉ๋ก์„ ์ถœ๋ ฅํ•˜๋Š” ๋ช…๋ น์–ด.

  • Syntax

    docker ps <option>
  • Options

    • -a, --all
      ๋ชจ๋“  ์ปจํ…Œ์ด๋„ˆ๋ฅผ ์ถœ๋ ฅ
      default ๊ฐ’์€ false๋กœ ๋˜์–ด์žˆ๋‹ค. ๊ทธ๋กœ์ธํ•ด ๋ชจ๋“  ์ปจํ…Œ์ด๋„ˆ๊ฐ€ ์ถœ๋ ฅ๋˜๋Š” ๊ฒƒ์ด ์•„๋‹Œ ์‹œ์ž‘๋œ ์ปจํ…Œ์ด๋„ˆ๋งŒ ์ถœ๋ ฅ๋œ๋‹ค. ๋ชจ๋“  ์ปจํ…Œ์ด๋„ˆ๋ฅผ ๋ณด๊ณ ์ž ํ•  ๋•Œ ํ•ด๋‹น option ์„ ์‚ฌ์šฉํ•˜์ž.

    • -l, --latest
      ์ œ์ผ ์ตœ์‹ ์— ์ƒ์„ฑ๋œ ์ปจํ…Œ์ด๋„ˆ ์ถœ๋ ฅ
      ์‹คํ–‰์ค‘์ด์ง€ ์•Š์€ ์ปจํ…Œ์ด๋„ˆ๋„ ํ•ด๋‹น๋œ๋‹ค.

    • -q, --quite
      ์‹คํ–‰์ค‘์ธ ์ปจํ…Œ์ด๋„ˆ ID ๋งŒ ์ถœ๋ ฅ

    • --no-trunc
      ์ปจํ…Œ์ด๋„ˆ ๋ชฉ๋ก ์ถœ๋ ฅ์‹œ truncate ๋ฅผ ์ ์šฉ์‹œํ‚ค์ง€ ์•Š์Œ.

    • s, --size
      ์ด ํŒŒ์ผ ์‚ฌ์ด์ฆˆ ์ถœ๋ ฅ

      • size: ์“ฐ๊ธฐ ๊ฐ€๋Šฅ ์‚ฌ์ด์ฆˆ only
      • virtual size: ์ฝ๊ธฐ ์ „์šฉ(read-only) ์‚ฌ์ด์ฆˆ์™€ ์“ฐ๊ธฐ ๊ฐ€๋Šฅ(writable) ์‚ฌ์ด์ฆˆ์˜ ์ด ํ•ฉ
      $ docker ps -s
      
      CONTAINER ID   IMAGE     COMMAND                  CREATED         STATUS       PORTS                      NAMES               SIZE
      123a45bcd68   alpine    "/bin/sh"                n days ago      Up n days                               cheetah              3.95MB (virtual 9.49MB)

โ†‘ return to TOC

pull

Pull an image or a repository from a registry.
Docker ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ์—์„œ image๋ฅผ pull๋ฐ›๋Š” ๋ช…๋ น์–ด.

  • Syntax

    docker pull <option> <repositoryName>/<imageName>:<tag>
    • <repositoryName>
      • Docker Hub User Name
      • Repository Address
    • tag๋ฅผ ์ง€์ •ํ•ด์ฃผ์ง€ ์•Š์œผ๋ฉด tag๊ฐ€ ๋ถ™์€ image๊ฐ€ ๋ชจ๋‘ pull ๋˜๋ฒ„๋ฆฐ๋‹ค.

โ†‘ return to TOC

push

Push an image or a repository to a registry.
Docker ๋ ˆ์ง€์ŠคํŠธ๋ฆฌ์— image๋ฅผ ์˜ฌ๋ฆฌ๋Š” ๋ช…๋ น์–ด.

  • Syntax

    docker push <repositoryName>/<imageName>:<tag>
    • <repositoryName>
      • Docker Hub User Name
      • Repository Address
    • tag๋ฅผ ์ง€์ •ํ•ด์ฃผ์ง€ ์•Š์œผ๋ฉด tag๊ฐ€ ๋ถ™์€ image๊ฐ€ ๋ชจ๋‘ push ๋˜๋ฒ„๋ฆฐ๋‹ค.

โ†‘ return to TOC

R

rename

Rename a container. ์ปจํ…Œ์ด๋„ˆ์˜ ๋ช…์นญ์„ ๋ณ€๊ฒฝํ•˜๋Š” ๋ช…๋ น์–ด.

  • Syntax
    docker rename <oldName> <newName>

โ†‘ return to TOC

restart

Restart one or more containers. ์ปจํ…Œ์ด๋„ˆ๋ฅผ ์žฌ์‹œ์ž‘ ์‹œํ‚ค๋Š” ๋ช…๋ น์–ด.

  • Syntax

    docker restart <option> <container>
  • Option

    • -t, --time
      n์ดˆ ์ดํ›„ ์žฌ์‹œ์ž‘ ์‹œํ‚ด.

      • default: 10s
        docker restart -t 5 blueberry-tree

โ†‘ return to TOC

rm

Remove one or more containers.
๊ฐ€๋™์ค‘์ด์ง€ ์•Š์€ ์ปจํ…Œ์ด๋„ˆ๋ฅผ ์‚ญ์ œํ•˜๋Š” ๋ช…๋ น์–ด.

  • Syntax

    docker rm <option> <container>
  • Options

    • -f, --force
      ์‹คํ–‰์ค‘์ธ ์ปจํ…Œ์ด๋„ˆ๋ฅผ ๊ฐ•์ œ๋กœ ์‚ญ์ œ ์‹œํ‚ด.

      • ์‹คํ–‰์ค‘์ธ ์ปจํ…Œ์ด๋„ˆ๋Š” ํ•ด๋‹น ์˜ต์…˜(-f) ์—†์ด ์‚ญ์ œ ์‹œํ‚ฌ ์ˆ˜ ์—†๋‹ค. ์˜ค๋ฅ˜ ๋ฐœ์ƒ.
        $ docker rm sushi-lover
        
        Error response from daemon: You cannot remove a running container 123a45bcd6789e0fghi12jk3456l7m8nopq901234567c59ec9b483a4adb7bc41. Stop the container before attempting removal or force remove
    • -v, --volumes
      ์ปจํ…Œ์ด๋„ˆ์— ํ• ๋‹น๋˜์–ด ์žˆ๋Š” ๋ณผ๋ฅจ์„ ์‚ญ์ œ ์‹œํ‚ด.

โ†‘ return to TOC

rmi

Remove one or more images

run

Run a command in a new container.
์ปจํ…Œ์ด๋„ˆ๋ฅผ ์ƒ์„ฑ(create)ํ•˜๊ณ  ์‹œ์ž‘(start)์‹œํ‚ค๋Š” ๋ช…๋ น์–ด.

  • Syntax

    docker run <options> <image>
  • Options

    • -d, --detach
      ์ปจํ…Œ์ด๋„ˆ๋ฅผ ๋ฐฑ๊ทธ๋ผ์šด๋“œ์—์„œ ์‹คํ–‰ ์‹œํ‚ด.
      • ๋ช…๋ น์–ด ์‹คํ–‰ ํ›„ Container ID ๊ฐ€ ์ถœ๋ ฅ๋œ๋‹ค.
    • -e, --env
      ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋ฅผ ์„ค์ •ํ•จ.
    • -i, --interactive ํ‘œ์ค€ ์ž…๋ ฅ(STDIN)์„ ์ง€์†์ ์œผ๋กœ ์—ด์–ด๋‘๋„๋ก ํ•จ.
    • -m, --memory ๋ฉ”๋ชจ๋ฆฌ๋ฅผ ์ œํ•œ ์‹œํ‚ด.
      • unit: b, k, m, g
    • --rm ์ปจํ…Œ์ด๋„ˆ๊ฐ€ ์ข…๋ฃŒ ๋  ์‹œ ์ž๋™ ์‚ญ์ œ๋จ.
      • Test ์šฉ๋„๋กœ ์ž ์‹œ ๋งŒ๋“ค์–ด์„œ ์‚ฌ์šฉํ•˜๋Š” ์ปจํ…Œ์ด๋„ˆ์— ์‚ฌ์šฉํ•˜๊ธฐ ์ ํ•ฉํ•œ ์˜ต์…˜.
    • -t, --tty
      Teletypewriter: pseudo-TTY ๋ฅผ ํ• ๋‹น ์‹œํ‚ด.
      • ์‹คํ–‰์ค‘์ธ ์ปจํ…Œ์ด๋„ˆ์— Input ์„ ๋‹จ๋ง ๋””๋ฐ”์ด์Šค(termianl device)๋กœ ์ง„ํ–‰ํ•  ๊ฒƒ์ž„์„ ๋ช…์‹œ.

โ†‘ return to TOC

S

save

Save one or more images to a tar archive (streamed to STDOUT by default)

search

Search the Docker Hub for images. Docker Hub ์˜ Public ์ด๋ฏธ์ง€๋ฅผ ๊ฒ€์ƒ‰ํ•˜๋Š” ๋ช…๋ น์–ด.

  • Syntax

    docker search <option> <searchKeyword>
    • STARS: ์ฆ๊ฒจ์ฐพ๊ธฐ๋กœ ๋“ฑ๋ก๋œ ์ˆ˜
    • OFFICIAL: ๊ณต์‹ ์ด๋ฏธ์ง€
    • AUTOMATED: Dockerfile์„ ํ†ตํ•ด ์ž๋™ ์ƒ์„ฑ๋œ ์ด๋ฏธ์ง€
      $ docker search rabbitmq
      
      NAME                                                   DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
      rabbitmq                                               RabbitMQ is an open source multi-protocol meโ€ฆ   4470      [OK]
      bitnami/rabbitmq                                       Bitnami Docker Image for RabbitMQ               89                   [OK]
      nasqueron/rabbitmqadmin                                RabbitMQ management plugin CLI tool Lightweiโ€ฆ   1                    [OK]
      bitnami/rabbitmq-exporter                                                                              1
      circleci/rabbitmq-delayed                              https://github.com/circleci/rabbitmq-delayedโ€ฆ   1
      rabbitmqoperator/cluster-operator                      The RabbitMQ Cluster Operator Docker Image      1
      nasqueron/rabbitmq                                     RabbitMQ wth management, MQTT and STOMP plugโ€ฆ   0                    [OK]
      itisfoundation/rabbitmq                                                                                0
      rapidfort/rabbitmq                                     RapidFort optimized, hardened image for Rabbโ€ฆ   0
      clearlinux/rabbitmq                                    RabbitMQ multi-protocol messaging broker witโ€ฆ   0
      corpusops/rabbitmq                                     https://github.com/corpusops/docker-images/     0
      drud/rabbitmq                                          rabbitmq                                        0                    [OK]
      bitnami/rabbitmq-cluster-operator                                                                      0
      ibmcom/rabbitmq-exporter-ppc64le                                                                       0
      newrelic/k8s-nri-rabbitmq                              New Relic Infrastructure RabbitMQ Integratioโ€ฆ   0
      ibmcom/rabbitmq-server-ppc64le                                                                         0
      ibmcom/rabbitmq-java-client-ppc64le                                                                    0
      ibmcom/rabbitmq-java-client                                                                            0
      circleci/rabbitmq                                      This image is for internal use                  0
  • Options

    • --limit
      n ๊ฐœ์˜ ๋ฆฌ์ŠคํŠธ๋งŒ ์ถœ๋ ฅ.

      $ docker search nginx --limit 2
      
      NAME            DESCRIPTION                  STARS     OFFICIAL   AUTOMATED
      nginx           Official build of Nginx.     17401     [OK]
      bitnami/nginx   Bitnami nginx Docker Image   140                  [OK]
    • --filter=stars=n
      n ๊ฐœ ์ด์ƒ starring ๋œ ์ด๋ฏธ์ง€ ๊ฒ€์ƒ‰.

      $ docker search postgres --filter=stars=150
      
      NAME                 DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
      postgres             The PostgreSQL object-relational database syโ€ฆ   11447     [OK]
      bitnami/postgresql   Bitnami PostgreSQL Docker Image                 154                  [OK]

โ†‘ return to TOC

start

Start one or more stopped containers. ์ •์ง€์ƒํƒœ์— ์žˆ๋Š” ์ปจํ…Œ์ด๋„ˆ๋ฅผ ๊ฐ€๋™์‹œํ‚ค๋Š” ๋ช…๋ น์–ด.

  • Syntax

    docker start <options> <container>
    $ docker start ada_lovelace

โ†‘ return to TOC

stats

Display a live stream of container(s) resource usage statistics. ์ปจํ…Œ์ด๋„ˆ์˜ ์ƒํƒœ๋ฅผ ํ™•์ธํ•˜๋Š” ๋ช…๋ น์–ด.

  • Syntax

    docker stats <options> <container>
    • CPU %: CPU ์‚ฌ์šฉ๋ฅ 
    • MEM %: Memrory ์‚ฌ์šฉ๋ฅ 
    • PIDS: ์ปจํ…Œ์ด๋„ˆ์— ์ดํ•ด ์ƒ์„ฑ๋œ ํ”„๋กœ์„ธ์Šค์™€ ์ปค๋„์˜ ์Šค๋ ˆ๋“œ ๊ฐœ์ˆ˜
      $ docker stats ada_lovelace
      
      CONTAINER ID   NAME           CPU %     MEM USAGE / LIMIT   MEM %     NET I/O           BLOCK I/O         PIDS
      12a345b67890   ada_lovelace   0.01%     231MiB / 3.844GiB   5.87%     1.95kB / 1.57kB   12.3MB / 20.5kB   109
  • Options

    • -a, --all
      ๋ชจ๋“  ์ปจํ…Œ์ด๋„ˆ ์ถœ๋ ฅ. (์ค‘์ง€์ƒํƒœ์— ์žˆ๋Š” ์ปจํ…Œ์ด๋„ˆ๋„ ํฌํ•จ)
    • --no-stream
      Live stream ์„ ์ ์šฉํ•˜์ง€ ์•Š๊ณ  ์ฒซ ๋ฒˆ์งธ ์ƒํƒœ ๊ฒฐ๊ณผ๋งŒ ์ถœ๋ ฅ.

โ†‘ return to TOC

stop

Stop one or more running containers.
์‹คํ–‰์ค‘์ธ ์ปจํ…Œ์ด๋„ˆ๋ฅผ ์ •์ง€์‹œํ‚ค๋Š” ๋ช…๋ น์–ด.

  • Syntax

    docker stop <options> <container>
    $ docker stop big_brother
  • Option

    • -t, --time
      ์ปจํ…Œ์ด๋„ˆ๋ฅผ n ์ดˆ ์ดํ›„์— ์ •์ง€์‹œํ‚ด.

      • default: 10s
      $ docker stop -t 3 big_brother

โ†‘ return to TOC

T

tag

Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE

top

Display the running processes of a container

โ†‘ return to TOC

U

unpause

Unpause all processes within one or more containers

update

Update configuration of one or more containers

โ†‘ return to TOC

V

version

Show the Docker version information.
๋„์ปค์˜ ๋ฒ„์ „ ์ •๋ณด๋ฅผ ์ถœ๋ ฅํ•˜๋Š” ๋ช…๋ น์–ด.

Check docker-compose Version

  • Syntax
    docker-compose --version

    result : docker-compose version 1.25.4, build 8d51620b

Update docker-compose Version

pip ๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ตœ์‹  ๋ฒ„์ „์œผ๋กœ ์—…๋ฐ์ดํŠธ ํ•˜๋Š” ๋ฒ•์€ ์•„๋ž˜์™€ ๊ฐ™๋‹ค.

  • Syntax
    sudo pip install --upgrade docker-compose

โ†‘ return to TOC

W

wait

Block until one or more containers stop, then print their exit codes

โ†‘ return to TOC