From d71fbcab1f3d9e6323a972551fda76ee82fffbb3 Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Wed, 25 May 2016 16:17:44 -0400 Subject: [PATCH] dockerfile: add check for GPL pip packages --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index cb20b2746..18850f0cc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -79,6 +79,10 @@ ADD .git/HEAD GIT_HEAD # Add all of the files! ADD . . +# If a pip package is licensed as GPL, fail the build. +# If this fails the build, change the last grep to be "grep -B 10 GPL" to see what package is GPLed. +RUN test -z "$(cat requirements.txt | grep -v "^-e" | awk -F'==' '{print $1}' | xargs pip show --disable-pip-version-check | grep -v LGPL | grep GPL)" + # Run the tests ARG RUN_TESTS=true ENV RUN_TESTS ${RUN_TESTS}