From f622e84607a8ecb4d8dd75d731063423ab38d189 Mon Sep 17 00:00:00 2001 From: MarkKoz Date: Fri, 21 Feb 2020 16:10:37 -0800 Subject: CI: install Pipfile into system interpreter A virtual environment is redundant in the context of deployment. It just increases the size and build time of the image. * Replace venv with system interpreter * Mount Python binaries in /usr/local/bin in NsJail * Fix #61: Python symlink in venv not resolving * Re-lock Pipfile because it wasn't up to date according to pipenv install --deploy --- docker/venv.Dockerfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'docker') diff --git a/docker/venv.Dockerfile b/docker/venv.Dockerfile index b415430..fe5b10d 100644 --- a/docker/venv.Dockerfile +++ b/docker/venv.Dockerfile @@ -4,10 +4,14 @@ ARG DEV ENV PIP_NO_CACHE_DIR=false \ PIPENV_DONT_USE_PYENV=1 \ PIPENV_HIDE_EMOJIS=1 \ - PIPENV_NOSPIN=1 \ - PIPENV_VENV_IN_PROJECT=1 + PIPENV_NOSPIN=1 COPY Pipfile Pipfile.lock snekbox.cfg /snekbox/ WORKDIR /snekbox -RUN if [ -n "${DEV}" ]; then pipenv sync --dev; else pipenv sync; fi +RUN if [ -n "${DEV}" ]; \ + then \ + pipenv install --deploy --system --dev; \ + else \ + pipenv install --deploy --system; \ + fi -- cgit v1.2.3