I have the following snippet in my Dockerfile:
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
RUN USER=root cargo new --bin foobar
The problem is, the 2nd RUN
fails because cargo
is not in the path.
Is there a way to fix this?
I've tried setting the path like this (inspired by this answer):
ENV PATH $HOME/.cargo/.bin:$PATH
but this doesn't seem to do the trick