When I am inside the container, the following works:
pip uninstall -y -r <(pip freeze)
Yet when I try to do the same in my Dockerfile like this:
RUN pip uninstall -y -r <(pip freeze)
I get:
------
> [ 7/10] RUN pip uninstall -y -r <(pip freeze):
#11 0.182 /bin/sh: 1: Syntax error: "(" unexpected
------
executor failed running [/bin/sh -c pip uninstall -y -r <(pip freeze)]: exit code: 2
How do I re-write this command to make it happy?
Edit:
I am using this work around. Still interested in the one-liner answer however
RUN pip freeze > to_delete.txt
RUN pip uninstall -y -r to_delete.txt