यह काम करता है:डोकर चलाने मैं आयकर छवि/bin/bash - स्रोत पहले फ़ाइलें
# echo 1 and exit:
$ docker run -i -t image /bin/bash -c "echo 1"
1
# exit
# echo 1 and return shell in docker container:
$ docker run -i -t image /bin/bash -c "echo 1; /bin/bash"
1
[email protected]:/#
प्रश्न: कैसे कर सकता है मैं source
खोल में एक फ़ाइल? (यह काम नहीं करता है)
$ docker run -i -t image /bin/bash -c "source <(curl -Ls git.io/apeepg) && /bin/bash"
# content from http://git.io/apeepg is sourced and shell is returned
[email protected]:/#
'स्रोत' एक अंतर्निहित है। यह 'कमांड' के रूप में मौजूद नहीं है, इसलिए यह केवल एक त्रुटि देता है। – Gerrat