devpocket.dev

Docker Run से Compose

एक या अधिक docker run commands को Compose YAML service file में बदलें।

लोकल चलता है
टूल लोड हो रहा है…

इस्तेमाल कैसे करें

एक या अधिक docker run commands पेस्ट करें, हर पंक्ति में एक। Backslash line continuations, shell quotes और escaped spaces supported हैं। बने हुए Compose file में ports, volumes, environment variables और files, names, restart policy, networks, working directory, entrypoint, user, labels, capabilities, memory, CPUs, image और command आते हैं।

नतीजा इस्तेमाल करने से पहले warning cards देखें: unsupported Docker flags का अनुमान लगाने के बजाय उन्हें साफ़ तौर पर छोड़ दिया जाता है।

आम सवाल

क्या कई containers एक साथ convert किए जा सकते हैं?

हाँ। हर docker run command अलग पंक्ति में रखें। हर command एक service बनेगी और image से निकले duplicate names में numeric suffix जुड़ जाएगा।

-d और -it को क्यों छोड़ दिया जाता है?

Compose attachment और interactive execution को command चलाते समय नियंत्रित करता है, इसलिए docker run के ये terminal flags service definition में नहीं आते।

मिलते-जुलते टूल