Mercurial > p > roundup > code
diff scripts/Docker/Dockerfile @ 7119:59908110ccc9
More changes to remove stragglers of old setuptools.
Pip update needs to be done in both the stage1 and stage2 images.
site-packages contain setuptools-65.5.0 in both stage1 and stage2.
Because I copy stage1's site-packages to stage2, I need to remove the
-65.5.0 directory in stage1 to prevent it from making the jump to
stage 2.
I do the pip update in stage2 before the copy, not after. So I don't
have to worry about pip update messing with my locally installed
files. But it does mean I have to pip update both stage1 and stage2.
I could probably get away with just 1 pip update if I did it after the
copy operation from stage1 into stage2 but... This way is probably
safer.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Wed, 28 Dec 2022 23:45:14 -0500 |
| parents | 9f3ca362a415 |
| children | 282ba72a5615 |
line wrap: on
line diff
--- a/scripts/Docker/Dockerfile Wed Dec 28 20:16:37 2022 -0500 +++ b/scripts/Docker/Dockerfile Wed Dec 28 23:45:14 2022 -0500 @@ -66,6 +66,16 @@ ENV PIP_ROOT_USER_ACTION=ignore RUN set -xv && CWD=$PWD && \ + upgrades=$(python3 -m pip --no-cache --disable-pip-version-check \ + list --outdated | awk 'NR > 2 {print $1}'); \ + if [ -n "$upgrades" ]; then \ + echo Pip updating $upgrades; \ + python -m pip --no-cache --disable-pip-version-check \ + install -U $upgrades < /dev/null; \ + else \ + echo Nothing to pip update; \ + fi; \ + ls -l /usr/local/lib/python3.11/site-packages; \ VER=$(apk list -I 'xapian-core-dev' | \ sed 's/^xapian-core-dev-\([0-9.]*\)-.*/\1/') && \ cd /tmp && \ @@ -148,7 +158,7 @@ if [ -n "$upgrades" ]; then \ echo Pip updating $upgrades; \ python -m pip --no-cache --disable-pip-version-check \ - install -U $upgrades; \ + install -U $upgrades < /dev/null; \ else \ echo Nothing to pip update; \ fi
