spacewander commented on a change in pull request #230:
URL: https://github.com/apache/apisix-docker/pull/230#discussion_r719021880
##########
File path: alpine/Dockerfile
##########
@@ -22,7 +22,7 @@ RUN set -x \
&& luarocks config variables.OPENSSL_INCDIR
/usr/local/openresty/openssl/include \
&& luarocks install
https://github.com/apache/apisix/raw/master/rockspec/apisix-${APISIX_VERSION}-0.rockspec
--tree=/usr/local/apisix/deps \
&& 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;) \
+ && (function version_check { ([ "$2" = "master" ] && return 1) || [ "$1" =
"$2" ] && return 1 || [ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]; };
if version_check 2.2.0 $APISIX_VERSION; 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;) \
Review comment:
`version_check` should be `ver_gt`. And please split this long line into
multiple lines.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]