Revert "Revert "docker/windows: build rust image in the ci""
[platform/upstream/gstreamer.git] / docker / windows / rust.Dockerfile
1 # escape=`
2
3 # Expect this to be set when calling docker build with
4 # --build-arg BASE_IMAGE="" and make it fail if not set.
5 ARG BASE_IMAGE="inavlid.gstreamer.freedesktop.org/invalid"
6 FROM $BASE_IMAGE
7
8 ARG DEFAULT_BRANCH="master"
9 ARG RUST_VERSION="1.52.1"
10
11 COPY install_gst.ps1 C:\
12 RUN C:\install_gst.ps1
13 RUN choco install -y pkgconfiglite
14 ENV PKG_CONFIG_PATH="C:/lib/pkgconfig"
15
16 ADD https://win.rustup.rs/x86_64 C:\rustup-init.exe
17 RUN C:\rustup-init.exe -y --profile minimal --default-toolchain $env:RUST_VERSION
18
19 # Uncomment for easy testing
20 # RUN git clone --depth 1 https://gitlab.freedesktop.org/gstreamer/gstreamer-rs.git
21 # RUN cd gstreamer-rs; cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=amd64; cargo build --all; cargo test --all"