rust-lang-deprecated/rustup.sh

Cannot run Rustup from dockerfile

ValentinTrinque opened this issue · 3 comments

Hi,

I tried to run install.sh (or rustup) from a dockerfile...

RUN curl -s https://static.rust-lang.org/rustup.sh > /home/install.sh
RUN chmod +x /home/install.sh
RUN sh /home/install.sh --disable-sudo

... but got the error:

/home/install.sh: line 1290: /dev/tty: No such device or address
rustup: failed to read from /dev/tty

When I run the docker container without running installation at image build, rustup works and run.

So, if I am right, it appears to be because it turns to be an interactive installation process and so, only doable when tty are present.

Does a not-interactive option could be added ?

Thanks.

Does anyone care ? Hahaha...

Hi Valentin,

If you add "-y" or "--yes" as a param to the script it will install silently.

./rustup.sh -y

Odd this isn't mentioned when running the script with "--help"!

I will post a "fix".

Thank you for your answer.