Skip to content

Commit

Permalink
Merge pull request #1288 from snyk/feat/support-pipfile-on-containeri…
Browse files Browse the repository at this point in the history
…zed-cli

feat: support pipfile on containerized cli
  • Loading branch information
jasiskis committed Jul 27, 2020
2 parents 870212f + 57e860b commit f35f39e
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions docker/docker-python-entrypoint.sh
Expand Up @@ -49,17 +49,27 @@ if [ -n "${TARGET_FILE}" ]; then
echo "Installing dependencies from setup.py"
pip install -U -e "${PROJECT_PATH}"
;;
*Pipfile)
echo "Installing dependencies from Pipfile"
installPipfileDeps
;;
*)
exitWithMsg "\"${PROJECT_PATH}/${TARGET_FILE}\" is not supported" 1
;;
esac
fi

if [ -f "${PROJECT_PATH}/requirements.txt" ]; then
echo "Found requirement.txt"
installRequirementsTxtDeps "${PROJECT_PATH}/requirements.txt"
elif [ -f "${PROJECT_PATH}/Pipfile" ]; then
installPipfileDeps
if [ -z "${TARGET_FILE}" ]; then
if [ -f "${PROJECT_PATH}/requirements.txt" ]; then
echo "Found requirement.txt"
installRequirementsTxtDeps "${PROJECT_PATH}/requirements.txt"
elif [ -f "${PROJECT_PATH}/setup.py" ]; then
echo "Found setup.py"
pip install -U -e "${PROJECT_PATH}"
elif [ -f "${PROJECT_PATH}/Pipfile" ]; then
echo "Found Pipfile"
installPipfileDeps
fi
fi

bash docker-entrypoint.sh "$@"

0 comments on commit f35f39e

Please sign in to comment.