Merge pull request #3358 from KeyboardNerd/fix_license
Fix python license checking and uninstall docutils on build
This commit is contained in:
commit
5808a84279
1 changed files with 11 additions and 6 deletions
17
Dockerfile
17
Dockerfile
|
@ -77,12 +77,22 @@ RUN curl -fsSL -o /usr/local/bin/prometheus-aggregator https://github.com/coreos
|
|||
&& chmod +x /usr/local/bin/prometheus-aggregator
|
||||
|
||||
# Install python dependencies
|
||||
# docutils is a setup dependency of botocore required by s3transfer. It's under
|
||||
# GPLv3, and so should be removed.
|
||||
COPY requirements.txt requirements-tests.txt ./
|
||||
RUN virtualenv --distribute venv \
|
||||
&& venv/bin/pip install -r requirements.txt \
|
||||
&& venv/bin/pip install -r requirements-tests.txt \
|
||||
&& (venv/bin/pip uninstall -y docutils || echo "docutils is not installed") \
|
||||
&& venv/bin/pip freeze
|
||||
|
||||
# Check python dependencies for the GPL
|
||||
# Due to the following bug, pip results must be piped to a file before grepping:
|
||||
# https://github.com/pypa/pip/pull/3304
|
||||
RUN venv/bin/pip freeze | grep -v "^-e" | awk -F'==' '{print $1}' | xargs venv/bin/pip --disable-pip-version-check show > pipinfo.txt && \
|
||||
test -z "$(cat pipinfo.txt | grep GPL | grep -v LGPL)" && \
|
||||
rm pipinfo.txt
|
||||
|
||||
# Install front-end dependencies
|
||||
COPY static/ package.json tsconfig.json webpack.config.js tslint.json yarn.lock ./
|
||||
RUN yarn install --ignore-engines
|
||||
|
@ -99,12 +109,7 @@ RUN adduser memcached --disabled-login --system
|
|||
|
||||
WORKDIR $QUAYDIR
|
||||
|
||||
# Check python dependencies for the GPL
|
||||
# Due to the following bug, pip results must be piped to a file before grepping:
|
||||
# https://github.com/pypa/pip/pull/3304
|
||||
RUN cat requirements.txt | grep -v "^-e" | awk -F'==' '{print $1}' | xargs venv/bin/pip --disable-pip-version-check show > pipinfo.txt && \
|
||||
test -z "$(cat pipinfo.txt | grep GPL | grep -v LGPL)" && \
|
||||
rm pipinfo.txt
|
||||
|
||||
|
||||
# JS compile
|
||||
COPY bill-of-materials.json bill-of-materials.json
|
||||
|
|
Reference in a new issue