티스토리 뷰

yum repository 관리에 필요한 yum-utils 를 설치한다. (설치가 안되어있을 경우)

$ sudo yum install -y yum-utils

Docker repository 추가

$ sudo yum-config-manager \
	--add-repo \
	https://download.docker.com/linux/centos/docker-ce.repo

Docker Engine 설치

$ sudo yum install docker-ce docker-ce-cli containerd.io

Docker 실행

$ sudo systemctl start docker

hellow-world 이미지로 Docker가 잘 설치 되었는지 확인

$ sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
2db29710123e: Pull complete 
Digest: sha256:975f4b14f326b05db86e16de00144f9c12257553bba9484fed41f9b6f2257800
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.
    (amd64)
 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:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/






dnf 를 이용하여 설치할 때도 yum 을 이용할때와 거의 동일하다.

$ sudo dnf -y install dnf-plugins-core
$ sudo dnf config-manager \
	--add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo
$ sudo dnf install docker-ce docker-ce-cli containerd.io



참고

https://docs.docker.com/engine/install/centos/

https://docs.docker.com/engine/install/fedora/

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday