How to add cargo (or any executable) to path in Dockerfile for subsequent build steps?

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



from Recent Questions - Stack Overflow https://ift.tt/3sJEH7R
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

I get wrong characters when retreiving the message body of an email using TIdIMAP4.UIDRetrieveTextPeek2()

How to drop the all the 1's in a correlation matrix

Today Walkin 14th-Sept