Use virtualenv

This commit is contained in:
Jakob Lechner 2023-03-09 23:38:39 +00:00
parent 1c158dcca2
commit f64f9028bb
No known key found for this signature in database
GPG key ID: 996082EFB5906C10
2 changed files with 6 additions and 3 deletions

View file

@ -57,7 +57,7 @@ security_scanner:
script: script:
- set -x - set -x
- export GITLAB_URL="$(echo "$CI_PROJECT_URL" | grep -Eo '^https?://[^/]*')" - export GITLAB_URL="$(echo "$CI_PROJECT_URL" | grep -Eo '^https?://[^/]*')"
- python3 -m security_scanner $target - /code/venv/bin/python -m security_scanner $target
only: only:
refs: refs:
- schedules - schedules

View file

@ -7,14 +7,17 @@ RUN apt-get update \
python3 \ python3 \
python3-apt \ python3-apt \
python3-pip \ python3-pip \
python3-venv \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
COPY setup.py /code/setup.py COPY setup.py /code/setup.py
WORKDIR /code WORKDIR /code
RUN pip3 install -e . RUN python3 -m venv --system-site-packages venv
RUN venv/bin/pip install -e .
ADD . /code ADD . /code
RUN python3 setup.py install RUN venv/bin/python setup.py install