root
계정 또는 sudo
명령어를 사용합니다.작성은
root
계정으로 사용할 예정 입니다.
/var/lib/docker
/karim/docker
dir를 생성했어요.mkdir
[default가 아닌 지정 docker data 영역 dir]
yum
update
yum install-y yum-utils device-mapper-persistent-data lvm2
yum-config-manager
--add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install
docker-ce
Error: Package: docker-ce-rootless-extras-26.1.4-1.el7.x86_64 (docker-ce-stable)
Requires: slirp4netns >= 0.4
Error: Package: docker-ce-rootless-extras-26.1.4-1.el7.x86_64 (docker-ce-stable)
Requires: fuse-overlayfs >= 0.7
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
yum install -y epel-release
yum install
http://vault.centos.org/centos/7/extras/x86_64/Packages/slirp4netns-0.4.3-4.el7_8.x86_64.rpm
yum install
http://vault.centos.org/centos/7/extras/x86_64/Packages/fuse-overlayfs-0.7.2-6.el7_8.x86_64.rpm
chkconfig
docker on
root
계정만 명령어 실행 가능usermod
-a -G docker [일반 계정]
vi
/etc/docker/daemon.json
{"data-root":"[위에 설정한 docker data 영역 dir]"}
service
docker start
ps
-ef | grep docker | grep dockerd | grep -v grep
[root@cede526eeb56 /]$ ps -ef | grep docker | grep dockerd | grep -v grep
root 1467 1 0 2월14 ? 02:11:18 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
cd
/karim/docker
[root@cede526eeb56 ~/docker] ls
containers network plugins swarm trust
image overlay2 tmp volumes
📌 여담
📚 참고