पैकर का उपयोग करके आईएसओ डाउनलोड करके डॉकर छवि कैसे बनाएं?

इंटरनेट से आईएसओ डाउनलोड करके पैकर का उपयोग करके खरोंच से चित्र बनाना संभव है ।

उद्देश्य: पैकर का उपयोग करके आईएसओ डाउनलोड करके डॉकर छवियां बनाने के लिए

प्रयास

प्रयास 1

डॉकर छवि आयात करना संभव है

[username@hostname]$ cat docker.json {    "builders":[{        "type": "docker",        "image": "ubuntu",        "export_path": "image.tar"    }]}

पैकर का उपयोग करना:

[username@hostname packer]$ packer build docker.json docker output will be in this color.==> docker: Creating a temporary directory for sharing data...==> docker: Pulling Docker image: ubuntu==> docker: Starting docker container...==> docker: Exporting the container==> docker: Killing the container: 6e0e5488d8b4f97667123ea965a561c91122f3efc6ef4b86a7c40560714d6577Build 'docker' finished.==> Builds finished. The artifacts of successful builds are:--> docker: Exported Docker file: image.tar

प्रयास 2

एक पैकर के बिल्डर प्रकार को बदलना।जेएसओएन जिसका उपयोग वर्चुअलबॉक्स छवि बनाने के लिए किया जाता है docker में परिणाम:

[username@hostname]$ packer build docker-scratch.json docker output will be in this color.15 error(s) occurred:* unknown configuration key: "boot_command"* unknown configuration key: "boot_wait"...* unknown configuration key: "vboxmanage"* unknown configuration key: "virtualbox_version_file"

समस्या

हालांकि, अगर एक डॉकर छवि बनाने की आवश्यकता है तो कई आधार छवियां डाउनलोड की जा सकती हैं, लेकिन क्या आईएसओ डाउनलोड करना और उसे डॉकर छवि में बदलना भी संभव है?


संदर्भ

मूल उदाहरण: निर्यात

enter image description here

हां, अपनी छवियों को बूटस्ट्रैप करना संभव है । जाँच करें mkimage-* से लिपियों कॉन्ट्रिब निर्देशिका ।