It makes more sense to set the release LTO profile into the related Cargo.toml section than into the Dockerfile only.
Using LTO 'thin' profile because according to the documentation it is a good compromise with no or little performance loss.