From 2079ed3891bfd578cd092167c9785211628b28d1 Mon Sep 17 00:00:00 2001 From: oznu Date: Thu, 5 Apr 2018 17:46:50 +1000 Subject: [PATCH] 0.9.14 --- Dockerfile | 12 +++++++----- Dockerfile.raspberry-pi | 12 +++++++----- README.md | 9 +++++---- root/etc/cont-init.d/30-defaults.sh | 1 + root/etc/cont-init.d/50-extensions | 2 +- root/etc/services.d/guacamole/run | 6 ++++++ 6 files changed, 27 insertions(+), 15 deletions(-) diff --git a/Dockerfile b/Dockerfile index b8d674c..b1c9d77 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM library/tomcat:7-jre8 ENV ARCH=amd64 \ - GUAC_VER=0.9.13-incubating \ + GUAC_VER=0.9.14 \ GUACAMOLE_HOME=/app/guacamole \ PG_MAJOR=9.6 \ PGDATA=/config/postgres \ @@ -46,18 +46,20 @@ RUN curl -SLO "https://sourceforge.net/projects/guacamole/files/current/source/g && ldconfig # Install guacamole-client and postgres auth adapter -RUN rm -rf ${CATALINA_HOME}/webapps/ROOT \ +RUN set -x \ + && rm -rf ${CATALINA_HOME}/webapps/ROOT \ && curl -SLo ${CATALINA_HOME}/webapps/ROOT.war "https://sourceforge.net/projects/guacamole/files/current/binary/guacamole-${GUAC_VER}.war" \ && curl -SLo ${GUACAMOLE_HOME}/lib/postgresql-42.1.4.jar "https://jdbc.postgresql.org/download/postgresql-42.1.4.jar" \ && curl -SLO https://sourceforge.net/projects/guacamole/files/current/extensions/guacamole-auth-jdbc-${GUAC_VER}.tar.gz \ && tar -xzf guacamole-auth-jdbc-${GUAC_VER}.tar.gz \ - && cp -R guacamole-auth-jdbc-${GUAC_VER}/postgresql/guacamole-auth-jdbc-postgresql-0.9.13-incubating.jar ${GUACAMOLE_HOME}/extensions/ \ + && cp -R guacamole-auth-jdbc-${GUAC_VER}/postgresql/guacamole-auth-jdbc-postgresql-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions/ \ && cp -R guacamole-auth-jdbc-${GUAC_VER}/postgresql/schema ${GUACAMOLE_HOME}/ \ && rm -rf guacamole-auth-jdbc-${GUAC_VER} guacamole-auth-jdbc-${GUAC_VER}.tar.gz # Add optional extensions -RUN mkdir ${GUACAMOLE_HOME}/extensions-available \ - && for i in auth-ldap auth-duo auth-header auth-noauth auth-cas; do \ +RUN set -xe \ + && mkdir ${GUACAMOLE_HOME}/extensions-available \ + && for i in auth-ldap auth-duo auth-header auth-noauth auth-cas auth-openid; do \ echo "https://sourceforge.net/projects/guacamole/files/current/extensions/guacamole-${i}-${GUAC_VER}.tar.gz" \ && curl -SLO "https://sourceforge.net/projects/guacamole/files/current/extensions/guacamole-${i}-${GUAC_VER}.tar.gz" \ && tar -xzf guacamole-${i}-${GUAC_VER}.tar.gz \ diff --git a/Dockerfile.raspberry-pi b/Dockerfile.raspberry-pi index 7fa0ea5..744ae88 100644 --- a/Dockerfile.raspberry-pi +++ b/Dockerfile.raspberry-pi @@ -1,7 +1,7 @@ FROM arm32v5/tomcat:7-jre8 ENV ARCH=armhf \ - GUAC_VER=0.9.13-incubating \ + GUAC_VER=0.9.14 \ GUACAMOLE_HOME=/app/guacamole \ PG_MAJOR=9.6 \ PGDATA=/config/postgres \ @@ -46,18 +46,20 @@ RUN curl -SLO "https://sourceforge.net/projects/guacamole/files/current/source/g && ldconfig # Install guacamole-client and postgres auth adapter -RUN rm -rf ${CATALINA_HOME}/webapps/ROOT \ +RUN set -x \ + && rm -rf ${CATALINA_HOME}/webapps/ROOT \ && curl -SLo ${CATALINA_HOME}/webapps/ROOT.war "https://sourceforge.net/projects/guacamole/files/current/binary/guacamole-${GUAC_VER}.war" \ && curl -SLo ${GUACAMOLE_HOME}/lib/postgresql-42.1.4.jar "https://jdbc.postgresql.org/download/postgresql-42.1.4.jar" \ && curl -SLO https://sourceforge.net/projects/guacamole/files/current/extensions/guacamole-auth-jdbc-${GUAC_VER}.tar.gz \ && tar -xzf guacamole-auth-jdbc-${GUAC_VER}.tar.gz \ - && cp -R guacamole-auth-jdbc-${GUAC_VER}/postgresql/guacamole-auth-jdbc-postgresql-0.9.13-incubating.jar ${GUACAMOLE_HOME}/extensions/ \ + && cp -R guacamole-auth-jdbc-${GUAC_VER}/postgresql/guacamole-auth-jdbc-postgresql-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions/ \ && cp -R guacamole-auth-jdbc-${GUAC_VER}/postgresql/schema ${GUACAMOLE_HOME}/ \ && rm -rf guacamole-auth-jdbc-${GUAC_VER} guacamole-auth-jdbc-${GUAC_VER}.tar.gz # Add optional extensions -RUN mkdir ${GUACAMOLE_HOME}/extensions-available \ - && for i in auth-ldap auth-duo auth-header auth-noauth auth-cas; do \ +RUN set -xe \ + && mkdir ${GUACAMOLE_HOME}/extensions-available \ + && for i in auth-ldap auth-duo auth-header auth-noauth auth-cas auth-openid; do \ echo "https://sourceforge.net/projects/guacamole/files/current/extensions/guacamole-${i}-${GUAC_VER}.tar.gz" \ && curl -SLO "https://sourceforge.net/projects/guacamole/files/current/extensions/guacamole-${i}-${GUAC_VER}.tar.gz" \ && tar -xzf guacamole-${i}-${GUAC_VER}.tar.gz \ diff --git a/README.md b/README.md index d61b096..aa0a27a 100644 --- a/README.md +++ b/README.md @@ -54,10 +54,11 @@ docker run \ Currently the available extensions are: -* auth-ldap - [LDAP Authentication](https://guacamole.incubator.apache.org/doc/0.9.13-incubating/gug/ldap-auth.html) -* auth-duo - [Duo two-factor authentication](https://guacamole.incubator.apache.org/doc/0.9.13-incubating/gug/duo-auth.html) -* auth-header - [HTTP header authentication](https://guacamole.incubator.apache.org/doc/0.9.13-incubating/gug/header-auth.html) -* auth-cas - [CAS Authentication](https://guacamole.incubator.apache.org/doc/0.9.13-incubating/gug/cas-auth.html) +* auth-ldap - [LDAP Authentication](https://guacamole.incubator.apache.org/doc/0.9.14/gug/ldap-auth.html) +* auth-duo - [Duo two-factor authentication](https://guacamole.incubator.apache.org/doc/0.9.14/gug/duo-auth.html) +* auth-header - [HTTP header authentication](https://guacamole.incubator.apache.org/doc/0.9.14/gug/header-auth.html) +* auth-cas - [CAS Authentication](https://guacamole.incubator.apache.org/doc/0.9.14/gug/cas-auth.html) +* auth-openid - [OpenID Connect authentication](http://guacamole.apache.org/doc/0.9.14/gug/openid-auth.html) You should only enable the extensions you require, if an extensions is not configured correctly in the `guacamole.properties` file it may prevent the system from loading. See the [official documentation](https://guacamole.incubator.apache.org/doc/0.9.13-incubating/gug/) for more details. diff --git a/root/etc/cont-init.d/30-defaults.sh b/root/etc/cont-init.d/30-defaults.sh index 8f7ec4e..464083e 100644 --- a/root/etc/cont-init.d/30-defaults.sh +++ b/root/etc/cont-init.d/30-defaults.sh @@ -1,3 +1,4 @@ #!/usr/bin/with-contenv sh cp -rn /app/guacamole /config +mkdir -p /root/.config/freerdp/known_hosts diff --git a/root/etc/cont-init.d/50-extensions b/root/etc/cont-init.d/50-extensions index 18d767e..2a2e110 100644 --- a/root/etc/cont-init.d/50-extensions +++ b/root/etc/cont-init.d/50-extensions @@ -1,7 +1,7 @@ #!/usr/bin/with-contenv sh # clean up extensions -for i in auth-ldap auth-duo auth-header auth-noauth auth-cas; do +for i in auth-ldap auth-duo auth-header auth-noauth auth-cas auth-openid; do rm -rf ${GUACAMOLE_HOME}/extensions/guacamole-${i}-${GUAC_VER}.jar done diff --git a/root/etc/services.d/guacamole/run b/root/etc/services.d/guacamole/run index 70e5540..cff16b1 100644 --- a/root/etc/services.d/guacamole/run +++ b/root/etc/services.d/guacamole/run @@ -11,6 +11,12 @@ if [ $? -ne 0 ]; then createuser -U postgres $POSTGRES_USER createdb -U postgres -O $POSTGRES_USER $POSTGRES_DB cat /app/guacamole/schema/*.sql | psql -U $POSTGRES_USER -d $POSTGRES_DB -f - + echo "0.9.14" > /config/.database-version +else + if [ "$(cat /config/.database-version)" != "0.9.14" ]; then + cat /app/guacamole/schema/upgrade/upgrade-pre-0.9.14.sql | psql -U $POSTGRES_USER -d $POSTGRES_DB -f - + echo "0.9.14" > /config/.database-version + fi fi echo "Starting guacamole client..."