diff --git a/README.md b/README.md index 4730d96610..aa0e24400b 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ The package argument is optional. If no package is given, Snyk will run the comm Snyk is also provided as a set of Docker images that carry the runtime environment of each package manager. For example, the npm image will carry all of the needed setup to run `npm install` on the currently running container. Currently there are images for npm, Ruby, Maven, Gradle and SBT. -The images can perform `snyk test` by default on the specified project which is mounted to the container as a read/write volume, and `snyk monitor` if the `MONITOR` environment variable is set when running the docker container. If you want an HTML report for `test` command, make sure `--json` parameter is provided. `monitor` command appends it automatically. An HTML file called `snyk_report.html` and a CSS file called `snyk_report.css` will be generated. The image also writes a file called `snyk-res.json` for internal use and `snyk-error.log` for errors that we can look at if something goes wrong. +The images can perform `snyk test` by default on the specified project which is mounted to the container as a read/write volume, and `snyk monitor` if the `MONITOR` environment variable is set when running the docker container. If you want an HTML report for `test` command (`--json` is appended automatically). An HTML file called `snyk_report.html` and a CSS file called `snyk_report.css` will be generated. The image also writes a file called `snyk-res.json` for internal use and `snyk-error.log` for errors that we can look at if something goes wrong. The following environment variables can be used when running the container on docker: diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index 81064214c0..3196afa530 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -81,7 +81,7 @@ cd "${PROJECT_PATH}/${PROJECT_FOLDER}/${PROJECT_SUBDIR}" || exitWithMsg "Can't cd to ${PROJECT_PATH}/${PROJECT_FOLDER}/${PROJECT_SUBDIR}" 1 runCmdAsDockerUser "PATH=${PATH} snyk ${SNYK_COMMAND} ${SNYK_PARAMS} \ -${ADDITIONAL_ENV} > \"${OUTPUT_FILE}\" 2>\"${ERROR_FILE}\"" +${ADDITIONAL_ENV} --json > \"${OUTPUT_FILE}\" 2>\"${ERROR_FILE}\"" RC=$? @@ -115,8 +115,6 @@ sed 's/<\/head>/ <\/head>/' \ runCmdAsDockerUser "cat /home/node/snyk_report.css > \ \"${PROJECT_PATH}/${PROJECT_FOLDER}/snyk_report.css\"" -# fi -# if [ $RC -ne "0" ]; then exitWithMsg "${OUTPUT_FILE}" "$RC"