diff --git a/Cargo.toml b/Cargo.toml
index 7033f0bdcc883096e80a8b4a426006514764f18e..42515b104c23d9b439972ac2d0d268895ffb91fa 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -205,6 +205,7 @@ yamux = { opt-level = 3 }
 zeroize = { opt-level = 3 }
 
 [profile.release]
+lto = "thin"
 # Substrate runtime requires unwinding.
 panic = "unwind"
 
diff --git a/docker/Dockerfile b/docker/Dockerfile
index bb2f489c8fd454b6c44166ed0e6faac8def33334..84b1b6af06f650998800272e371464a24034efe2 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -21,8 +21,7 @@ RUN test -x build/duniter || \
 ARG threads=1
 RUN test -x build/duniter || \
     ( \
-        CARGO_PROFILE_RELEASE_LTO="true" \
-            cargo build --release -j $threads && \
+        cargo build --release -j $threads && \
         mkdir -p build && \
         mv target/release/duniter build/ \
     )