From 7a18835335b3ef0ed4e5cf47526e8fd8a419c718 Mon Sep 17 00:00:00 2001 From: stijndcl Date: Fri, 19 Apr 2024 15:23:53 +0200 Subject: [PATCH] Revert "Compile rust binaries outside of docker image and copy them in" This reverts commit 5f2fe0a14d6de980e60d651e9e77124698d627cf. --- unipept-database/Dockerfile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/unipept-database/Dockerfile b/unipept-database/Dockerfile index afbeaf1..517b67b 100755 --- a/unipept-database/Dockerfile +++ b/unipept-database/Dockerfile @@ -62,7 +62,19 @@ RUN dos2unix /unipept-database/scripts/**/*.sh && chmod u+x /unipept-database/sc RUN echo 'root:unipept' | chpasswd -ADD rust-binaries /unipept-database/scripts/helper_scripts +# Install Rust toolchain (https://rustup.rs/) +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y +RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc +ENV PATH="/root/.cargo/bin:${PATH}" + +# Compile Rust binaries +RUN /unipept-database/scripts/build_binaries.sh + +# Clean up build artifacts so they don't end up in the image +RUN rm -rf /unipept-database/scripts/helper_scripts/unipept-database-rs/target/ + +# Uninstall Rust again to keep the image size down +RUN rustup self uninstall -y # Database types that should be processed by this image. Delimited by comma's. ENV DB_TYPES swissprot