rust-lang-deprecated/rustup.sh

Installation fails in popular docker base container buildpack-deps:jessie

FelixWeis opened this issue · 0 comments

The issue is that sudo is not available. Should not be necessary since docker user is usually root during the build phase. Simple check if we are root and ommit sudo should work fine.

FROM buildpack-deps:jessie

RUN apt-get update && apt-get install sudo -y \
     && curl -sSf https://static.rust-lang.org/rustup.sh | sh \
     && cargo install ... \
     && SUDO_FORCE_REMOVE=yes apt-get remove sudo -y \
     && rm -rf /var/lib/apt/lists/*

I could save 3 LOC.