diff --git a/docker/fedora/Dockerfile b/docker/fedora/Dockerfile index 31bdd58c63..fdd972432d 100644 --- a/docker/fedora/Dockerfile +++ b/docker/fedora/Dockerfile @@ -1,5 +1,7 @@ FROM registry.fedoraproject.org/fedora:30 +ENV PATH=/usr/local/cargo/bin:$PATH + COPY prepare.sh cleanup.sh /root/ RUN /usr/bin/sh /root/prepare.sh && \ diff --git a/docker/fedora/prepare.sh b/docker/fedora/prepare.sh index aba45b9669..b773c04045 100644 --- a/docker/fedora/prepare.sh +++ b/docker/fedora/prepare.sh @@ -197,6 +197,28 @@ dnf download glib2-doc gdk-pixbuf2-devel*x86_64* gtk3-devel-docs rpm -i --reinstall *.rpm rm -f *.rpm +# Install Rust +RUSTUP_VERSION=1.21.0 +RUST_VERSION=1.40.0 +RUST_ARCH="x86_64-unknown-linux-gnu" + +# rustup-init uses those variables as install paths +export RUSTUP_HOME=/usr/local/rustup +export CARGO_HOME=/usr/local/cargo +dnf install -y wget +RUSTUP_URL=https://static.rust-lang.org/rustup/archive/$RUSTUP_VERSION/$RUST_ARCH/rustup-init +wget $RUSTUP_URL +dnf remove -y wget + +chmod +x rustup-init; +./rustup-init -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION; +rm rustup-init; +chmod -R a+w $RUSTUP_HOME $CARGO_HOME + +rustup --version +cargo --version +rustc --version + # get gst-build and make all subprojects available git clone git://anongit.freedesktop.org/gstreamer/gst-build /gst-build/ cd /gst-build