diff options
author | Daniel Axtens <dja@axtens.net> | 2020-01-29 00:55:20 +1100 |
---|---|---|
committer | Stephen Finucane <stephen@that.guru> | 2020-02-27 22:28:50 +0000 |
commit | 5b904f91c4cab1ff3f8460c9d4ed920a990c8db3 (patch) | |
tree | 49f868c33d23ef54939191d215ffd0ff7455c729 | |
parent | 46bd25f46d79e4cc143e7c5cedae818381d904ba (diff) | |
download | patchwork-5b904f91c4cab1ff3f8460c9d4ed920a990c8db3.tar patchwork-5b904f91c4cab1ff3f8460c9d4ed920a990c8db3.tar.gz |
pyenv: also install requirements for python2
The first time you do a migration with python3, you get a whole
lot of seemingly null changes. This is a bit annoying so I use
py2 to generate the changes. To do that, first fix the pyenv
transition so requirements are still installed for python2.
Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Stephen Finucane <stephen@that.guru>
-rw-r--r-- | tools/docker/Dockerfile | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index 62ac461..ba7ae29 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -51,14 +51,22 @@ RUN pyenv latest install 2.7 && \ pyenv latest install 3.6 && \ pyenv latest install 3.7 && \ pyenv latest install 3.8 -RUN pyenv global $(pyenv versions --bare | tac) - -RUN pip install tox tox-pyenv # we deliberately leave the requirements files in /opt so we can ping the user # in entrypoint.sh if they change COPY requirements-dev.txt requirements-test.txt /opt/ -RUN pip install -r /opt/requirements-dev.txt + +# old python 2.7 deps +RUN pyenv global $(pyenv versions --bare) + +RUN pip install tox tox-pyenv && \ + pip install -r /opt/requirements-dev.txt + +# most recent python deps +RUN pyenv global $(pyenv versions --bare | tac) + +RUN pip install tox tox-pyenv && \ + pip install -r /opt/requirements-dev.txt COPY tools/docker/entrypoint.sh /usr/local/bin/entrypoint.sh ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] |