Table of Contents



현재 최신 버전은 17.12.0-ce 입니다.

이미지와 컨테이너를 이용한 가상화 컴퓨팅


도커는 가상화된 이미지를 이용해 컨테이너를 실행하는 소프트웨어입니다. 간편한 사용법과 도커 허브에서 공유되고 있는 다양한 가상화 이미지 덕분에 필요한 서비스를 컨테이너 단위로 실행하거나 제거할 수 있습니다. 그리고 Dockerfile 을 이용해서 새로운 이미지를 빌드하면 언제나 동일한 사용환경을 가진 자신만의 개발 환경을 구축할 수 있습니다.

설치 방법


우분투 16.04 ~

# Remove old version
$ sudo apt-get remove docker docker-engine

# Install packages
$ sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \

# Add Docker's official GPG key
$ curl -fsSL | sudo apt-key add -

$ sudo apt-key fingerprint 0EBFCD88
  • x86_64 / amd64
$ sudo add-apt-repository \
   "deb [arch=amd64] \
   $(lsb_release -cs) \
  • armhf
$ sudo add-apt-repository \
   "deb [arch=amd64] \
   $(lsb_release -cs) \
  • IBM Power
$ sudo add-apt-repository \
   "deb [arch=ppc64el] \
   $(lsb_release -cs) \
  • IBM Z (s390x)
$ sudo add-apt-repository \
   "deb [arch=s390x] \
   $(lsb_release -cs) \
$ sudo apt-get install docker-ce


$ yum update
$ yum install docker
$ systemctl enable docker.service
$ systemctl start docker.service
$ systemctl status docker.service


$ subscription-manager register –username=<username> –auto-attach
$ subscription-manager repos –enable=rhel-7-server-extras-rpms
$ subscription-manager repos –enable=rhel-7-server-optimal-rpms
$ yum update
$ reboot
$ yum install docker
$ systemctl start docker.service
$ systemctl enable docker.service
$ systemctl status docker.service

설치된 패키지


$ sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
ca4f61b1923c: Pull complete
Digest: sha256:083de497cff944f969d8499ab94f07134c50bcf5e6b9559b27182d3fa80ce3f7
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:

For more examples and ideas, visit:
$ sudo docker --version
Docker version 17.12.0-ce, build c97c6d6




docker [ --help | -v | --version ]


  • --config string :

Location of client config files (default "root.docker")

  • -D, --debug :

Enable debug mode

  • --help :

Print usage

  • -H, --host value :

Daemon socket(s) to connect to (default [])

  • -l, --log-level string :

Set the logging level ("debug"|"info"|"warn"|"error"|"fatal") (default "info")

  • --tls :

Use TLS; implied by --tlsverify

  • --tlscacert string :

Trust certs signed only by this CA (default "root.docker/ca.pem")

  • --tlscert string :

Path to TLS certificate file (default "root.docker/cert.pem")

  • --tlskey string :

Path to TLS key file (default "root.docker/key.pem")

  • --tlsverify :

Use TLS and verify the remote

  • -v, --version :

Print version information and quit

환경 변수


The API version to use (e.g. 1.19)


The location of your client configuration files.


The location of your authentication keys.


The graph driver to use.


Daemon socket to connect to.


Prevent warnings that your Linux kernel is unsuitable for Docker.


If set this will disable ‘pivot_root’.


When set Docker uses TLS and verifies the remote.


When set Docker uses notary to sign and verify images. Equates to --disable-content-trust=false for build, create, pull, push, run.


The URL of the Notary server to use. This defaults to the same URL as the registry.


When set, Docker hides “legacy” top-level commands (such as docker rm, and docker pull) in docker help output, and only Management commands per object-type (e.g., docker container) are printed. This may become the default in a future release, at which point this environment-variable is removed.


Location for temporary Docker files.



명령어 설명
attach Attach local standard input, output, and error streams to a running container
build Build an image from a Dockerfile
checkpoint Manage checkpoints
commit Create a new image from a container’s changes
config Manage Docker configs
container Manage containers
cp Copy files/folders between a container and the local filesystem
create Create a new container
deploy Deploy a new stack or update an existing stack
diff Inspect changes to files or directories on a container’s filesystem
events Get real time events from the server
exec Run a command in a running container
export Export a container’s filesystem as a tar archive
history Show the history of an image
image Manage images
images List images
import Import the contents from a tarball to create a filesystem image
info Display system-wide information
inspect Return low-level information on Docker objects
kill Kill one or more running containers
load Load an image from a tar archive or STDIN
login Log in to a Docker registry
logout Log out from a Docker registry
logs Fetch the logs of a container
network Manage networks
node Manage Swarm nodes
pause Pause all processes within one or more containers
plugin Manage plugins
port List port mappings or a specific mapping for the container
ps List containers
pull Pull an image or a repository from a registry
push Push an image or a repository to a registry
rename Rename a container
restart Restart one or more containers
rm Remove one or more containers
rmi Remove one or more images
run Run a command in a new container
save Save one or more images to a tar archive (streamed to STDOUT by default)
search Search the Docker Hub for images
secret Manage Docker secrets
service Manage services
stack Manage Docker stacks
start Start one or more stopped containers
stats Display a live stream of container(s) resource usage statistics
stop Stop one or more running containers
swarm Manage Swarm
system Manage Docker
tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
top Display the running processes of a container
trust Manage trust on Docker images (experimental)
unpause Unpause all processes within one or more containers
update Update configuration of one or more containers
version Show the Docker version information
volume Manage volumes
wait Block until one or more containers stop, then print their exit codes


Date: 2018-02-20

Author: Dongsoo Lee

Created: 2018-12-10 Mon 03:13