diff options
author | 2020-02-21 16:10:37 -0800 | |
---|---|---|
committer | 2020-02-21 16:14:43 -0800 | |
commit | f622e84607a8ecb4d8dd75d731063423ab38d189 (patch) | |
tree | a0133bdfa0f771ef9418ecbee550a8ea12625aec /docker | |
parent | Merge pull request #55 from python-discord/proper-chroot (diff) |
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
Diffstat (limited to 'docker')
-rw-r--r-- | docker/venv.Dockerfile | 10 |
1 files changed, 7 insertions, 3 deletions
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 |