diff --git a/docker/Dockerfile b/docker/Dockerfile
index 08a77ab1ba040396aca18dd9083478409f1bb565..cc930872f8edecbb09da27e6e457c53dacbe4df6 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -6,6 +6,7 @@
 # with the image paritytech/ci-linux:production (currently based on
 # debian:buster-slim) used by the gitlab CI
 FROM rust:1-buster as build
+WORKDIR /root
 
 RUN apt-get update && \
     DEBIAN_FRONTEND=noninteractive apt-get install -y \
@@ -16,8 +17,13 @@ COPY . .
 
 # build duniter
 ARG threads=1
-RUN CARGO_PROFILE_RELEASE_LTO="true" \
-        cargo build --release -j $threads
+RUN test -x build/duniter || \
+    ( \
+        CARGO_PROFILE_RELEASE_LTO="true" \
+            cargo build --release -j $threads && \
+        mkdir -p build && \
+        mv target/release/duniter build/ \
+    )
 
 # ------------------------------------------------------------------------------
 # Final Stage
@@ -30,7 +36,7 @@ LABEL version="0.0.0"
 LABEL description="Crypto-currency software (based on Substrate framework) to operate Äž1 libre currency"
 
 # Intall
-COPY --from=build /target/release/duniter /usr/local/bin/duniter
+COPY --from=build /root/build/duniter /usr/local/bin/duniter
 COPY docker/docker-entrypoint /usr/local/bin/
 
 # Configuration