Skip to content

Commit

Permalink
docker: Enforce sorted requirements at build time
Browse files Browse the repository at this point in the history
  • Loading branch information
hartwork committed Sep 28, 2024
1 parent b34b58f commit f85fc2c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,15 @@ RUN cd /tmp/app \
&& \
diff -u0 \
<(sed -e '/--hash=/d' -e 's/ \\$//' -e '/^#/d' -e '/^$/d' requirements-*.txt | sort -f) \
<(pip3 freeze | sed -e '/^setuptools==/d' -e '/^wheel==/d' | sort -f)
<(pip3 freeze | sed -e '/^setuptools==/d' -e '/^wheel==/d' | sort -f) \
&& \
diff -u1 \
<(grep == requirements-direct.txt | sed 's,==.*,,') \
<(grep == requirements-direct.txt | sed 's,==.*,,' | sort -f) \
&& \
diff -u1 \
<(grep == requirements-indirect.txt | sed 's,==.*,,') \
<(grep == requirements-indirect.txt | sed 's,==.*,,' | sort -f)

USER root
RUN apk upgrade --update
Expand Down

0 comments on commit f85fc2c

Please sign in to comment.