fix: reduce docker layer and remove user flag from pip install

This commit is contained in:
Thomas Boerger 2024-06-05 10:28:32 +02:00
parent 80e2c8ed16
commit bad8c6ab4a
No known key found for this signature in database
GPG Key ID: F630596501026DB5
4 changed files with 6 additions and 8 deletions

View File

@ -53,9 +53,8 @@ USER 1001
# renovate: datasource=pypi depName=ansible
ENV ANSIBLE_VERSION 9.4.0
RUN mkdir /opt/semaphore/venv
RUN python3 -m venv /opt/semaphore/venv --system-site-packages && \
RUN mkdir /opt/semaphore/venv && \
python3 -m venv /opt/semaphore/venv --system-site-packages && \
source /opt/semaphore/venv/bin/activate && \
pip3 install --upgrade pip ansible==${ANSIBLE_VERSION} boto3 botocore requests

View File

@ -18,7 +18,7 @@ fi
if test -f "${SEMAPHORE_CONFIG_PATH}/requirements.txt"; then
echoerr "Installing additional python dependencies"
pip3 install --upgrade --user \
pip3 install --upgrade \
-r "${SEMAPHORE_CONFIG_PATH}/requirements.txt"
else
echoerr "No additional python dependencies to install"

View File

@ -53,9 +53,8 @@ USER 1001
# renovate: datasource=pypi depName=ansible
ENV ANSIBLE_VERSION 9.4.0
RUN mkdir /opt/semaphore/venv
RUN python3 -m venv /opt/semaphore/venv --system-site-packages && \
RUN mkdir /opt/semaphore/venv && \
python3 -m venv /opt/semaphore/venv --system-site-packages && \
source /opt/semaphore/venv/bin/activate && \
pip3 install --upgrade pip ansible==${ANSIBLE_VERSION} boto3 botocore requests

View File

@ -190,7 +190,7 @@ fi
if test -f "${SEMAPHORE_CONFIG_PATH}/requirements.txt"; then
echoerr "Installing additional python dependencies"
pip3 install --upgrade --user \
pip3 install --upgrade \
-r "${SEMAPHORE_CONFIG_PATH}/requirements.txt"
else
echoerr "No additional python dependencies to install"