diff --git a/Dockerfile b/Dockerfile index df410e7..7b55cb6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -57,7 +57,7 @@ COPY ./root/ / # - In order to drop the root user, we have to make some directories world # writable as OpenShift default security model is to run the container # under random UID. -RUN virtualenv ${APP_ROOT} && \ +RUN python3.8 -m venv ${APP_ROOT} && \ chown -R 1001:0 ${APP_ROOT} && \ fix-permissions ${APP_ROOT} -P diff --git a/s2i/bin/assemble b/s2i/bin/assemble index 26fcf6d..6f24d63 100755 --- a/s2i/bin/assemble +++ b/s2i/bin/assemble @@ -9,13 +9,9 @@ function should_collectstatic() { } function virtualenv_bin() { - if head "/etc/redhat-release" | grep -q "^CentOS Linux release 7" || \ - head "/etc/redhat-release" | grep -q "^Red Hat Enterprise Linux\( Server\)\? release 7" || \ - head "/etc/redhat-release" | grep -q "^Fedora release"; then - virtualenv $1 - else - virtualenv-${PYTHON_VERSION} $1 - fi + # New versions of Python (>3.6) should use venv module + # from stdlib instead of virtualenv package + python3.8 -m venv $1 } # Install pipenv to the separate virtualenv to isolate it