dockerfile: add check for GPL pip packages
This commit is contained in:
parent
f3d9f76b22
commit
d71fbcab1f
1 changed files with 4 additions and 0 deletions
|
@ -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}
|
||||
|
|
Reference in a new issue