This is an automated email from the ASF dual-hosted git repository.
soulbird pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-docker.git
The following commit(s) were added to refs/heads/master by this push:
new 4e07a70 fix: add rust cargo support for `all-in-one` dashboard
Dockerfile (#457)
4e07a70 is described below
commit 4e07a7045dd5569c6a9028402e327991adbda9c4
Author: leslie <[email protected]>
AuthorDate: Tue Apr 11 08:31:13 2023 +0800
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
---
all-in-one/apisix-dashboard/Dockerfile | 6 ++++++
1 file changed, 6 insertions(+)
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 @@ RUN set -x \
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;) \