diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c60a9bfe6047016ef5a97c1205b1ef898bcf3e07..6e9582edd5e8bf98ffe67bede465c26f14559800 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -10,8 +10,8 @@ img:
         apt-get update -qq &&
         apt-get install -qq -y curl &&
         curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none &&
-        ./bootstrap.sh -d &&
         source "$HOME/.cargo/env" &&
+        ./bootstrap.sh -d &&
         make ci-img IMG_TAG=$CI_COMMIT_REF_NAME
     artifacts:
         paths: