Container (LXC)
ให้เพิ่ม IP ของ caddy เข้าไปใน file /etc/hosts
ตัวอย่าง
10.4.8.4 learn.thaimooc.progress.plus *.learn.thaimooc.progress.plus
ถ้าใน Container มี docker
(10.4.7.13 คือ IP ของ container LXC)
- ให้เพิ่ม "dns": ["10.4.7.13", "8.8.8.8"] ใน
/etc/docker/daemon.json - ติดตั้ง dnsmasq ที่ host (container lxc)
- แก้ไข
/etc/dnsmasq.config
listen-address=127.0.0.1,10.4.7.13 - Restart docker
- Exec เข้าไปใน docker container with user root + (apt update && apt install dnsutils -y)
- Test:
nslookup studio.learn.thaimooc.progress.plus 10.4.7.13