diff --git a/Dockerfile.staticbuild b/Dockerfile.staticbuild
index 66342fa4ef8feee823ad73431e0d3ba39e11904e..794c9d932511bda0f9e01c8b6ffd4fe0fbf75bf5 100644
--- a/Dockerfile.staticbuild
+++ b/Dockerfile.staticbuild
@@ -70,9 +70,12 @@ RUN set -x && \
     git submodule init && \
     git submodule update
 
+# Cleanup for 'build' directory added, because it purges all artefacts
+# produced for curl build, including the old configuration in build/curl
 RUN set -x && \
     find . -name 'CMakeFiles' -type d -exec rm -rf {} + && \
-    find . -name 'CMakeCache.txt' -type f -delete
+    find . -name 'CMakeCache.txt' -type f -delete && \
+    rm -rf build
 
 RUN pip install -r /tarantool/test-run/requirements.txt