1. Docker 설치
[root@localhost ~]# yum install yum-utils
[root@localhost ~]# yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo Loaded plugins: fastestmirror, langpacks
adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
grabbing file https://download.docker.com/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo
[root@localhost ~]# yum -y install docker-ce
[root@localhost ~]# rpm -qa | grep docker
docker-ce-20.10.2-3.el7.x86_64
docker-ce-cli-20.10.2-3.el7.x86_64
docker-ce-rootless-extras-20.10.2-3.el7.x86_64
[root@localhost ~]# systemctl start docker
[root@localhost ~]# systemctl enable docker
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
[root@localhost ~]# systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)
Active: active (running) since Sat 2021-01-30 10:28:13 EST; 43s ago
Docs: https://docs.docker.com
Main PID: 55967 (dockerd)
CGroup: /system.slice/docker.service
└─55967 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
[root@localhost ~]# docker version
Client: Docker Engine - Community
Version: 20.10.2
API version: 1.41
Go version: go1.13.15
Git commit: 2291f61
Built: Mon Dec 28 16:17:48 2020
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.2
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
Git commit: 8891c58
Built: Mon Dec 28 16:16:13 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.3
GitCommit: 269548fa27e0089a8b8278fc4fc781d7f65a939b
runc:
Version: 1.0.0-rc92
GitCommit: ff819c7e9184c13b7c2607fe6c30ae19403a7aff
docker-init:
Version: 0.19.0
GitCommit: de40ad0
2. Docker 컨테이너 생성
[root@localhost ~]# docker pull mariadb
*/ docker pull 이미지명 : 저장소에서 이미지 가져오기 /*
Using default tag: latest
latest: Pulling from library/mariadb
83ee3a23efb7: Pull complete
db98fc6f11f0: Pull complete
f611acd52c6c: Pull complete
aa2333e25466: Pull complete
f53ac4b825fd: Pull complete
c20afcf9b055: Pull complete
54c5dc6dcf19: Pull complete
b1c71d744483: Pull complete
863a8cc01d1c: Pull complete
5d1a793b093f: Pull complete
477cd2b3eba8: Pull complete
402454543166: Pull complete
Digest: sha256:8040983db146f729749081c6b216a19d52e0973134e2e34c0b4fd87f48bc15b0
Status: Downloaded newer image for mariadb:latest
docker.io/library/mariadb:latest
[root@localhost ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
mariadb latest ade39f0469a3 9 days ago 407MB
# docker run --name mariadb-basic
'Cloud > Kubernetes' 카테고리의 다른 글
[Kubernetes] 도커 쿠버네티스 설치 (0) | 2021.12.06 |
---|---|
[kubernetes] 설치없이 쿠버네티스 사용하기 (0) | 2021.12.06 |
[Kubernetes] Kubernetes 소개 (0) | 2021.12.05 |
[Kubernetes] 2.1 클러스터 생성하기 (0) | 2021.02.02 |
[Kubernetes] 1. Hello minikube (0) | 2021.02.02 |