GUACAMOLE-682: fix env variable passing
Project: http://git-wip-us.apache.org/repos/asf/guacamole-client/repo Commit: http://git-wip-us.apache.org/repos/asf/guacamole-client/commit/95611f2d Tree: http://git-wip-us.apache.org/repos/asf/guacamole-client/tree/95611f2d Diff: http://git-wip-us.apache.org/repos/asf/guacamole-client/diff/95611f2d Branch: refs/heads/master Commit: 95611f2d936e2434829209ad6caa5f9b4a586efa Parents: 0f31028 Author: Joern Lentes <joern.len...@web.de> Authored: Fri Dec 21 14:50:46 2018 +0100 Committer: Joern Lentes <joern.len...@web.de> Committed: Fri Dec 21 14:50:46 2018 +0100 ---------------------------------------------------------------------- Dockerfile | 4 +++- guacamole-docker/bin/build-guacamole.sh | 3 ++- guacamole-docker/bin/start.sh | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/95611f2d/Dockerfile ---------------------------------------------------------------------- diff --git a/Dockerfile b/Dockerfile index 7eefcc8..8c12c75 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,6 +30,8 @@ ARG TOMCAT_JRE=jre8 # Use official maven image for the build FROM maven:3-jdk-8 AS builder +ARG BUILD_PROFILE + # Build environment variables ENV \ BUILD_DIR=/tmp/guacamole-docker-BUILD @@ -41,7 +43,7 @@ COPY guacamole-docker/bin/ /opt/guacamole/bin/ COPY . "$BUILD_DIR" # Run the build itself -RUN /opt/guacamole/bin/build-guacamole.sh "$BUILD_DIR" /opt/guacamole +RUN /opt/guacamole/bin/build-guacamole.sh "$BUILD_DIR" /opt/guacamole "$BUILD_PROFILE" # For the runtime image, we start with the official Tomcat distribution FROM tomcat:${TOMCAT_VERSION}-${TOMCAT_JRE} http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/95611f2d/guacamole-docker/bin/build-guacamole.sh ---------------------------------------------------------------------- diff --git a/guacamole-docker/bin/build-guacamole.sh b/guacamole-docker/bin/build-guacamole.sh index 1f4ab77..acb1d3f 100755 --- a/guacamole-docker/bin/build-guacamole.sh +++ b/guacamole-docker/bin/build-guacamole.sh @@ -41,6 +41,7 @@ BUILD_DIR="$1" DESTINATION="$2" +BUILD_PROFILE="$3" # # Create destination, if it does not yet exist @@ -116,7 +117,7 @@ tar -xzf extensions/guacamole-auth-ldap/target/*.tar.gz \ # Copy Radius auth extension if it was build # -if [[ "$BUILD_PROFILE ~= "lgpl-extentions" ]]; then +if [ -f extensions/guacamole-auth-radius/target/guacamole-auth-radius*.jar ]; then mkdir -p "$DESTINATION/radius" cp extensions/guacamole-auth-radius/target/guacamole-auth-radius*.jar "$DESTINATION/radius" fi http://git-wip-us.apache.org/repos/asf/guacamole-client/blob/95611f2d/guacamole-docker/bin/start.sh ---------------------------------------------------------------------- diff --git a/guacamole-docker/bin/start.sh b/guacamole-docker/bin/start.sh index 8fb3bc1..0732283 100755 --- a/guacamole-docker/bin/start.sh +++ b/guacamole-docker/bin/start.sh @@ -370,7 +370,7 @@ make sure they are readable for the user in the container. END exit 1; fi - if [ $RADIUS_AUTH_PROTOCOL == "eap-ttls" -a -z "$RADIUS_EAP_TTLS_INNER_PROTOCOL" ]; then + if [ "$RADIUS_AUTH_PROTOCOL" == "eap-ttls" -a -z "$RADIUS_EAP_TTLS_INNER_PROTOCOL" ]; then cat <<END FATAL: Authentication protocol "eap-ttls" specified but RADIUS_EAP_TTLS_INNER_PROTOCOL is not set!