Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dockerfile: switch to virtualenv #418

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ARG OC_CHANNEL=stable


RUN dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm &&\
dnf install -y python38 jq git unzip chromium chromedriver redhat-lsb-core &&\
dnf install -y python38 jq git unzip chromium chromedriver redhat-lsb-core python3-virtualenv &&\
dnf clean all

## Install yq in the image
Expand Down Expand Up @@ -43,8 +43,7 @@ COPY utils/scripts/logger.py utils/scripts/logger.py
COPY utils/scripts/util.py utils/scripts/util.py
RUN chmod +x run.sh
COPY requirements.txt setup.py .
RUN python3 --version
RUN python3 -m venv venv && source venv/bin/activate && pip3 install --upgrade pip && venv/bin/pip3 install -r requirements.txt
RUN virtualenv -p /usr/bin/python3.8 venv && source venv/bin/activate && pip3 install --upgrade pip && venv/bin/pip3 install -r requirements.txt

# set the non-root user
RUN chgrp -R 1001 $HOME/ods-ci && chown -R 1001 $HOME/ods-ci && chmod -R 744 $HOME/ods-ci
Expand Down