diff --git a/Dockerfile.unit b/Dockerfile.unit index 941c039251e4f..f790a735fde6d 100644 --- a/Dockerfile.unit +++ b/Dockerfile.unit @@ -1,8 +1,8 @@ -FROM registry.redhat.io/ubi8:8.6-754 as builder +FROM registry.redhat.io/ubi8:6-754 as builder RUN INSTALL_PKGS=" \ - rust-toolset \ cmake \ + libarchive \ make \ git \ openssl-devel \ @@ -17,10 +17,17 @@ RUN INSTALL_PKGS=" \ rpm -V $INSTALL_PKGS && \ yum clean all +ENV HOME=/root +RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain 1.58.1 -y +ENV CARGO_HOME=$HOME/.cargo +ENV PATH=$CARGO_HOME/bin:$PATH + RUN mkdir -p /src WORKDIR /src COPY . /src + +RUN chmod -R 777 /src $CARGO_HOME RUN mkdir -p ~/.cargo/bin && \ for plugin in nextest deny; do \ ln -s /src/thirdparty/cargo-${plugin}/cargo-${plugin}-linux-$(arch) ~/.cargo/bin/cargo-${plugin}; \