title: Permission denied when trying to use cargo with docker
body: <p>I have a docker container built from the following image : FROM debian:9.11-slim</p>
  <p>I try to install rust using the following line in my Dockerfile and it works fine until the last line. I get a permission denied error whenever I try to run /rust/cargo. However, if I connect to the container and run it from there via the command line it works. However, I need to be able to run rust/cargo commands from the docker file. Any help?</p>
  <pre><code>ENV RUSTUP_HOME=/rust/rustup
  ENV CARGO_HOME=/rust/cargo
  RUN set -eux; \
  url=&quot;https://raw.githubusercontent.com/rust-lang/rustup/1.22.1/rustup-init.sh&quot;; \
  wget -O rustup-init.sh &quot;$url&quot;; \
  echo &quot;b273275cf4d83cb6b991c1090baeca54 rustup-init.sh&quot; | md5sum -c -; \
  echo &quot;8928261388c8fae83bfd79b08d9030dfe21d17a8b59e9dcabda779213f6a3d14 rustup-            init.sh&quot; | sha256sum -c -; \
  bash ./rustup-init.sh --profile=minimal -y -t thumbv7em-none-eabihf; \
  rm rustup-init.sh; \
  chmod -R go+rwX /rust; \
  /rust/cargo --version
  </code></pre>