CONTRIBUTING: provide a template for new issues
| ... | ... |
@@ -64,6 +64,45 @@ Please also include the steps required to reproduce the problem if |
| 64 | 64 |
possible and applicable. This information will help us review and fix |
| 65 | 65 |
your issue faster. |
| 66 | 66 |
|
| 67 |
+### Template |
|
| 68 |
+ |
|
| 69 |
+``` |
|
| 70 |
+Description of problem: |
|
| 71 |
+ |
|
| 72 |
+ |
|
| 73 |
+`docker version`: |
|
| 74 |
+ |
|
| 75 |
+ |
|
| 76 |
+`docker info`: |
|
| 77 |
+ |
|
| 78 |
+ |
|
| 79 |
+`uname -a`: |
|
| 80 |
+ |
|
| 81 |
+ |
|
| 82 |
+Environment details (AWS, VirtualBox, physical, etc.): |
|
| 83 |
+ |
|
| 84 |
+ |
|
| 85 |
+How reproducible: |
|
| 86 |
+ |
|
| 87 |
+ |
|
| 88 |
+Steps to Reproduce: |
|
| 89 |
+1. |
|
| 90 |
+2. |
|
| 91 |
+3. |
|
| 92 |
+ |
|
| 93 |
+ |
|
| 94 |
+Actual Results: |
|
| 95 |
+ |
|
| 96 |
+ |
|
| 97 |
+Expected Results: |
|
| 98 |
+ |
|
| 99 |
+ |
|
| 100 |
+Additional info: |
|
| 101 |
+ |
|
| 102 |
+ |
|
| 103 |
+ |
|
| 104 |
+``` |
|
| 105 |
+ |
|
| 67 | 106 |
## Build Environment |
| 68 | 107 |
|
| 69 | 108 |
For instructions on setting up your development environment, please |
| 70 | 109 |
new file mode 100644 |
| ... | ... |
@@ -0,0 +1,105 @@ |
| 0 |
+#!/bin/sh |
|
| 1 |
+ |
|
| 2 |
+# This is a convenience script for reporting issues that include a base |
|
| 3 |
+# template of information. See https://github.com/docker/docker/pull/8845 |
|
| 4 |
+ |
|
| 5 |
+set -e |
|
| 6 |
+ |
|
| 7 |
+DOCKER_ISSUE_URL=${DOCKER_ISSUE_URL:-"https://github.com/docker/docker/issues/new"}
|
|
| 8 |
+DOCKER_ISSUE_NAME_PREFIX=${DOCKER_ISSUE_NAME_PREFIX:-"Report: "}
|
|
| 9 |
+DOCKER=${DOCKER:-"docker"}
|
|
| 10 |
+DOCKER_COMMAND="${DOCKER}"
|
|
| 11 |
+export DOCKER_COMMAND |
|
| 12 |
+ |
|
| 13 |
+# pulled from https://gist.github.com/cdown/1163649 |
|
| 14 |
+function urlencode() {
|
|
| 15 |
+ # urlencode <string> |
|
| 16 |
+ |
|
| 17 |
+ local length="${#1}"
|
|
| 18 |
+ for (( i = 0; i < length; i++ )); do |
|
| 19 |
+ local c="${1:i:1}"
|
|
| 20 |
+ case $c in |
|
| 21 |
+ [a-zA-Z0-9.~_-]) printf "$c" ;; |
|
| 22 |
+ *) printf '%%%02X' "'$c" |
|
| 23 |
+ esac |
|
| 24 |
+ done |
|
| 25 |
+} |
|
| 26 |
+ |
|
| 27 |
+function template() {
|
|
| 28 |
+# this should always match the template from CONTRIBUTING.md |
|
| 29 |
+ cat <<- EOM |
|
| 30 |
+ Description of problem: |
|
| 31 |
+ |
|
| 32 |
+ |
|
| 33 |
+ \`docker version\`: |
|
| 34 |
+ `${DOCKER_COMMAND} -D version`
|
|
| 35 |
+ |
|
| 36 |
+ |
|
| 37 |
+ \`docker info\`: |
|
| 38 |
+ `${DOCKER_COMMAND} -D info`
|
|
| 39 |
+ |
|
| 40 |
+ |
|
| 41 |
+ \`uname -a\`: |
|
| 42 |
+ `uname -a` |
|
| 43 |
+ |
|
| 44 |
+ |
|
| 45 |
+ Environment details (AWS, VirtualBox, physical, etc.): |
|
| 46 |
+ |
|
| 47 |
+ |
|
| 48 |
+ How reproducible: |
|
| 49 |
+ |
|
| 50 |
+ |
|
| 51 |
+ Steps to Reproduce: |
|
| 52 |
+ 1. |
|
| 53 |
+ 2. |
|
| 54 |
+ 3. |
|
| 55 |
+ |
|
| 56 |
+ |
|
| 57 |
+ Actual Results: |
|
| 58 |
+ |
|
| 59 |
+ |
|
| 60 |
+ Expected Results: |
|
| 61 |
+ |
|
| 62 |
+ |
|
| 63 |
+ Additional info: |
|
| 64 |
+ |
|
| 65 |
+ |
|
| 66 |
+ EOM |
|
| 67 |
+} |
|
| 68 |
+ |
|
| 69 |
+function format_issue_url() {
|
|
| 70 |
+ if [ ${#@} -ne 2 ] ; then
|
|
| 71 |
+ return 1 |
|
| 72 |
+ fi |
|
| 73 |
+ local issue_name=$(urlencode "${DOCKER_ISSUE_NAME_PREFIX}${1}")
|
|
| 74 |
+ local issue_body=$(urlencode "${2}")
|
|
| 75 |
+ echo "${DOCKER_ISSUE_URL}?title=${issue_name}&body=${issue_body}"
|
|
| 76 |
+} |
|
| 77 |
+ |
|
| 78 |
+ |
|
| 79 |
+echo -ne "Do you use \`sudo\` to call docker? [y|N]: " |
|
| 80 |
+read -r -n 1 use_sudo |
|
| 81 |
+echo "" |
|
| 82 |
+ |
|
| 83 |
+if [ "x${use_sudo}" = "xy" -o "x${use_sudo}" = "xY" ]; then
|
|
| 84 |
+ export DOCKER_COMMAND="sudo ${DOCKER}"
|
|
| 85 |
+fi |
|
| 86 |
+ |
|
| 87 |
+echo -ne "Title of new issue?: " |
|
| 88 |
+read -r issue_title |
|
| 89 |
+echo "" |
|
| 90 |
+ |
|
| 91 |
+issue_url=$(format_issue_url "${issue_title}" "$(template)")
|
|
| 92 |
+ |
|
| 93 |
+if which xdg-open 2>/dev/null >/dev/null ; then |
|
| 94 |
+ echo -ne "Would like to launch this report in your browser? [Y|n]: " |
|
| 95 |
+ read -r -n 1 launch_now |
|
| 96 |
+ echo "" |
|
| 97 |
+ |
|
| 98 |
+ if [ "${launch_now}" != "n" -a "${launch_now}" != "N" ]; then
|
|
| 99 |
+ xdg-open "${issue_url}"
|
|
| 100 |
+ fi |
|
| 101 |
+fi |
|
| 102 |
+ |
|
| 103 |
+echo "If you would like to manually open the url, you can open this link if your browser: ${issue_url}"
|
|
| 104 |
+ |