fix: add rust cargo support for `all-in-one` dashboard Dockerfile (#457)

* fix: add rust cargo support for `all-in-one` dashboard Dockerfile

* chore: add `sudo` support for rust install script
diff --git a/all-in-one/apisix-dashboard/Dockerfile b/all-in-one/apisix-dashboard/Dockerfile
index c3469bd..9fec9cf 100644
--- a/all-in-one/apisix-dashboard/Dockerfile
+++ b/all-in-one/apisix-dashboard/Dockerfile
@@ -37,10 +37,16 @@
     cmake \
     git \
     openldap-dev \
+    sudo \
     && mkdir ~/.luarocks \
     && luarocks config variables.OPENSSL_LIBDIR /usr/local/openresty/openssl/lib \
     && luarocks config variables.OPENSSL_INCDIR /usr/local/openresty/openssl/include \
     && git config --global url.https://github.com/.insteadOf git://github.com/ \
+    && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sudo sh -s -- -y \
+    && source "$HOME/.cargo/env" \
+    && export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse \
+    # next line is for rust cdylib compile on musl
+    && export RUSTFLAGS="-C target-feature=-crt-static"  \
     && luarocks install https://github.com/apache/apisix/raw/master/rockspec/apisix-${APISIX_VERSION}-0.rockspec --tree=/usr/local/apisix/deps PCRE_DIR=/usr/local/openresty/pcre \
     && cp -v /usr/local/apisix/deps/lib/luarocks/rocks-5.1/apisix/${APISIX_VERSION}-0/bin/apisix /usr/bin/ \
     && (if [ "$APISIX_VERSION" = "master" ] || [ "$APISIX_VERSION" \> "2.2" ]; then echo 'use shell ';else bin='#! /usr/local/openresty/luajit/bin/luajit\npackage.path = "/usr/local/apisix/?.lua;" .. package.path'; sed -i "1s@.*@$bin@" /usr/bin/apisix ; fi;) \