mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-09 10:02:56 +01:00
Fix Rust installation
There were a number of issues: 1. `rustc` wasn't actually installed since the `INSTALL_RUST_VERSION` argument wasn't set. 2. `rustup` wasn't running properly since the `CARGO_HOME` and `RUSTUP_HOME`weren't being exported and set by default. We now use the technique described in https://github.com/rust-lang/rustup/issues/1085 to create a wrapper and link all the binaries in /opt/rust/bin and link them to /usr/local/bin. 3. `rustc version` is not a valid command. `rustc --version` is valid.
This commit is contained in:
parent
a5ac3f8e7f
commit
9e04d5d21a
3 changed files with 19 additions and 6 deletions
|
|
@ -17,12 +17,12 @@ RUN /scripts/install-essentials ${BUILD_OS}
|
|||
|
||||
ENV PATH $PATH:/usr/local/go/bin
|
||||
|
||||
ENV PATH /usr/local/cargo/bin:$PATH
|
||||
ENV PATH /usr/local/bin:$PATH
|
||||
|
||||
# Rust
|
||||
ARG INSTALL_RUST_VERSION
|
||||
|
||||
RUN if [ -n "$INSTALL_RUST_VERSION" ] ; then /scripts/install-rust "${INSTALL_RUST_VERSION}" && rustc version; fi
|
||||
RUN if [ -n "$INSTALL_RUST_VERSION" ] ; then /scripts/install-rust "${INSTALL_RUST_VERSION}" && rustc --version; fi
|
||||
|
||||
# Ruby
|
||||
ARG RUBY_VERSION
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue