Setting Docker Image Caching
วิธีเปิดใช้งานและตั้งค่า image caching บน instance
Prerequisite
ต้องมี instance อยู่ใน project หากไม่มี ศึกษาได้จาก ขั้นตอนการ launch instance
Instructions
สำหรับ image ที่ไม่ใช่ distribution image จะต้อง config registry mirror ไปที่ https://registry-cache.nipa.cloud
1. แก้ไข file docker config
Access เข้าแก้ไข file /etc/docker/daemon.json โดยใช้ command
$nano /etc/docker/daemon.json
และเพิ่มค่าดังนี้ลงไปใน file
{
"registry-mirror": "https://registry-cache.nipa.cloud"
}
จากนั้นออกจาก editor และ save file
2. Restart Docker service
Restart Docker service โดยใช้ command
systemctl restart docker.service
3. ตรวจสอบผลการ config
ตรวจสอบว่า config เสร็จเรียบร้อยดีหรือไม่ โดยใช้ command
docker info
registry mirrors ควรแสดงดังรูปด้านล่าง ก็เป็นอันเสร็จสิ้น
Last updated
Was this helpful?