ควรเป็น tutorial simple but useful เมื่อเร็วๆ นี้แสดง native orchestration swarm mode Docker 1.12 functionality ใหม่ไม่มีใน earlier builds CentOS 7 ยังมี older version ใน repos หากต้องการทดสอบ stuck for now
Inevitably resolved one day แต่ไม่ควร discourage อ่านจบบทความ CentOS repos always lag behind official release หากไม่อยาก compromise latest/greatest OS howto นี้ช่วยไปถึงที่นั่น ตามมา
Setup Repository
Task แรก: setup Docker repo ใน CentOS ทำหลายครั้ง Docker no exception repo info available Docker project site Copy text ต่อไปนี้ into docker.repo file place under /etc/yum.repos.d:
[dockerrepo] name=Docker Repository baseurl=https://yum.dockerproject.org/repo/main/centos/7 enabled=1 gpgcheck=1 gpgkey=https://yum.dockerproject.org/gpg
ขั้นตอนต่อไป: install new Docker packages สำคัญที่สุด new engine:
yum install docker-engine
แตะจะได้ RPM conflict issue (หลายตัว):
Error: docker-engine-selinux conflicts with docker-selinux-1.10.3-46.el7.centos.10.x86_64 Error: docker-engine conflicts with docker-1.10.3-46.el7.centos.10.x86_64 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest Transaction check error: file /usr/bin/docker from install of docker-engine-1.12.1-1.el7.centos.x86_64 conflicts with file from package docker-common-1.10.3-46.el7.centos.10.x86_64
Resolve Package Errors
ต้อง remove existing Docker packages รวม docker engine, selinux, common แล้ว install ใหม่ manual procedure แต่ไม่ใช้เวลานาน
yum remove docker
จากนั้น install ใหม่:
yum install docker
ถ้า hit errors manually remove remaining packages e.g.:
yum remove docker-common-1.10.3-46.el7.centos.10.x86_64
Complete installation successfully check version:
docker -v Docker version 1.12.1, build 23cf638
ควร run docker service commands ได้โดยไม่มี errors
สรุป (Conclusion)
Tutorial นี้จะ simpler ก็ต่อเมื่อร้องให้ฟัง reverse in Prussian แต่แล้วเราอยู่ที่นี่ One day version 1.12 ancient past แต่ถ้าอ่านเพราะรัน slightly more conservative server edition Linux distro repo data slightly behind official channels ใช้ guide นี้ work around problem test latest Docker stuff without compromising rest goodies distro like CentOS provides
Methodology enabling new repos not new Did time again tamed CentOS submission perfection Resolving repository conflicts encountered openSUSE pimping past Finally Docker running all well Very simple Elegant Efficient Enjoy stay tuned more container stuff.
Cheers.