From 8a190d106dc4f7ff12c797f8c91cad087301bf2a Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Thu, 20 Jan 2022 13:35:18 -0600 Subject: [PATCH 1/8] Start on 1.4.0 --- .github/stale.yml | 17 ----------------- Dockerfile | 14 +++++++------- 2 files changed, 7 insertions(+), 24 deletions(-) delete mode 100644 .github/stale.yml diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index 30a0b0b..0000000 --- a/.github/stale.yml +++ /dev/null @@ -1,17 +0,0 @@ -# Number of days of inactivity before an issue becomes stale -daysUntilStale: 30 -# Number of days of inactivity before a stale issue is closed -daysUntilClose: 5 -# Issues with these labels will never be considered stale -exemptLabels: - - pinned - - security -# Label to use when marking an issue as stale -staleLabel: stale -# Comment to post when marking an issue as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. -# Comment to post when closing a stale issue. Set to `false` to disable -closeComment: false \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index b702875..390db95 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ FROM library/tomcat:9-jre11 ENV ARCH=amd64 \ - GUAC_VER=1.3.0 \ + GUAC_VER=1.4.0 \ GUACAMOLE_HOME=/app/guacamole \ - PG_MAJOR=9.6 \ + PG_MAJOR=13 \ PGDATA=/config/postgres \ POSTGRES_USER=guacamole \ POSTGRES_DB=guacamole_db @@ -27,13 +27,13 @@ RUN apt-get update && apt-get install -y \ libswscale-dev freerdp2-dev libfreerdp-client2-2 libpango1.0-dev \ libssh2-1-dev libtelnet-dev libvncserver-dev \ libpulse-dev libssl-dev libvorbis-dev libwebp-dev libwebsockets-dev \ - ghostscript postgresql-${PG_MAJOR} \ + ghostscript build-essential postgresql-${PG_MAJOR} \ && rm -rf /var/lib/apt/lists/* # Link FreeRDP to where guac expects it to be RUN [ "$ARCH" = "armhf" ] && ln -s /usr/local/lib/freerdp /usr/lib/arm-linux-gnueabihf/freerdp || exit 0 RUN [ "$ARCH" = "amd64" ] && ln -s /usr/local/lib/freerdp /usr/lib/x86_64-linux-gnu/freerdp || exit 0 - +RUN echo $PATH # Install guacamole-server RUN curl -SLO "http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/${GUAC_VER}/source/guacamole-server-${GUAC_VER}.tar.gz" \ && tar -xzf guacamole-server-${GUAC_VER}.tar.gz \ @@ -49,7 +49,7 @@ RUN curl -SLO "http://apache.org/dyn/closer.cgi?action=download&filename=guacamo RUN set -x \ && rm -rf ${CATALINA_HOME}/webapps/ROOT \ && curl -SLo ${CATALINA_HOME}/webapps/ROOT.war "http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/${GUAC_VER}/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 ${GUACAMOLE_HOME}/lib/postgresql-42.1.4.jar "https://jdbc.postgresql.org/download/postgresql-42.2.24.jar" \ && curl -SLO "http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/${GUAC_VER}/binary/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-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions/ \ @@ -60,8 +60,8 @@ RUN set -x \ RUN set -xe \ && mkdir ${GUACAMOLE_HOME}/extensions-available \ && for i in auth-ldap auth-duo auth-header auth-cas auth-openid auth-quickconnect auth-totp; do \ - echo "http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/${GUAC_VER}/binary/guacamole-${i}-${GUAC_VER}.tar.gz" \ - && curl -SLO "http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/${GUAC_VER}/binary/guacamole-${i}-${GUAC_VER}.tar.gz" \ + echo "https://dlcdn.apache.org/guacamole/${GUAC_VER}/binary/guacamole-${i}-${GUAC_VER}.tar.gz" \ + && curl -SLO "https://dlcdn.apache.org/guacamole/${GUAC_VER}/binary/guacamole-${i}-${GUAC_VER}.tar.gz" \ && tar -xzf guacamole-${i}-${GUAC_VER}.tar.gz \ && cp guacamole-${i}-${GUAC_VER}/guacamole-${i}-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions-available/ \ && rm -rf guacamole-${i}-${GUAC_VER} guacamole-${i}-${GUAC_VER}.tar.gz \ From 6143e1e0443ff729b6904cd19b5ba34dffe8ba17 Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Thu, 20 Jan 2022 13:36:10 -0600 Subject: [PATCH 2/8] Update README.md --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index 9660b8c..5a93e1b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ -**:warning: This project is now archived and no longer supported. Please contact me if you maintain a replacement and would like me to link to your repo.** - # Docker Guacamole A Docker Container for [Apache Guacamole](https://guacamole.apache.org/), a client-less remote desktop gateway. It supports standard protocols like VNC, RDP, and SSH over HTML5. @@ -93,4 +91,4 @@ Copyright (C) 2017-2020 oznu This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the [GNU General Public License](./LICENSE) for more details. \ No newline at end of file +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the [GNU General Public License](./LICENSE) for more details. From 114f165d2cf283ff9fbbac7105cedffbee36484e Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Thu, 20 Jan 2022 22:34:19 -0600 Subject: [PATCH 3/8] Move s6-overlay around and use ADD --- Dockerfile | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 390db95..fd70fd2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,18 +8,6 @@ ENV ARCH=amd64 \ POSTGRES_USER=guacamole \ POSTGRES_DB=guacamole_db -# Apply the s6-overlay - -RUN curl -SLO "https://github.com/just-containers/s6-overlay/releases/download/v1.20.0.0/s6-overlay-${ARCH}.tar.gz" \ - && tar -xzf s6-overlay-${ARCH}.tar.gz -C / \ - && tar -xzf s6-overlay-${ARCH}.tar.gz -C /usr ./bin \ - && rm -rf s6-overlay-${ARCH}.tar.gz \ - && mkdir -p ${GUACAMOLE_HOME} \ - ${GUACAMOLE_HOME}/lib \ - ${GUACAMOLE_HOME}/extensions - -WORKDIR ${GUACAMOLE_HOME} - # Install dependencies RUN apt-get update && apt-get install -y \ libcairo2-dev libjpeg62-turbo-dev libpng-dev \ @@ -30,10 +18,25 @@ RUN apt-get update && apt-get install -y \ ghostscript build-essential postgresql-${PG_MAJOR} \ && rm -rf /var/lib/apt/lists/* + +# Apply the s6-overlay +ADD https://github.com/just-containers/s6-overlay/releases/download/v2.2.0.3/s6-overlay-${ARCH}.tar.gz /tmp +RUN tar -xzf /tmp/s6-overlay-${ARCH}.tar.gz -C / +RUN tar -xzf /tmp/s6-overlay-${ARCH}.tar.gz -C /usr ./bin +RUN rm -rf /tmp/s6-overlay-${ARCH}.tar.gz + +RUN mkdir -p ${GUACAMOLE_HOME} \ + ${GUACAMOLE_HOME}/lib \ + ${GUACAMOLE_HOME}/extensions + +WORKDIR ${GUACAMOLE_HOME} + # Link FreeRDP to where guac expects it to be RUN [ "$ARCH" = "armhf" ] && ln -s /usr/local/lib/freerdp /usr/lib/arm-linux-gnueabihf/freerdp || exit 0 RUN [ "$ARCH" = "amd64" ] && ln -s /usr/local/lib/freerdp /usr/lib/x86_64-linux-gnu/freerdp || exit 0 + RUN echo $PATH + # Install guacamole-server RUN curl -SLO "http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/${GUAC_VER}/source/guacamole-server-${GUAC_VER}.tar.gz" \ && tar -xzf guacamole-server-${GUAC_VER}.tar.gz \ From a0ce971309164931927774bd03a4aa26b60dcb37 Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Thu, 20 Jan 2022 22:34:41 -0600 Subject: [PATCH 4/8] set bind for guacd this fixes kubernets ipv6 --- root/etc/services.d/guacd/run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/root/etc/services.d/guacd/run b/root/etc/services.d/guacd/run index da9e903..af8ef3a 100644 --- a/root/etc/services.d/guacd/run +++ b/root/etc/services.d/guacd/run @@ -1,4 +1,4 @@ #!/usr/bin/with-contenv sh echo "Starting guacamole guacd..." -s6-setuidgid root guacd -f +s6-setuidgid root guacd -f -b 127.0.0.1 From 7e8fa4f0e858c3ad2b864ec177712d4aeb081ecc Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Thu, 20 Jan 2022 22:45:59 -0600 Subject: [PATCH 5/8] revert to Postgres 9.6 --- Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fd70fd2..5b7d26a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,11 +3,15 @@ FROM library/tomcat:9-jre11 ENV ARCH=amd64 \ GUAC_VER=1.4.0 \ GUACAMOLE_HOME=/app/guacamole \ - PG_MAJOR=13 \ + PG_MAJOR=9.6 \ PGDATA=/config/postgres \ POSTGRES_USER=guacamole \ POSTGRES_DB=guacamole_db +# Add Postgres Repository +RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main" >> /etc/apt/sources.list.d/pgdg.list +RUN wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | apt-key add - + # Install dependencies RUN apt-get update && apt-get install -y \ libcairo2-dev libjpeg62-turbo-dev libpng-dev \ From 017d8ea8444c1a1ab906e506cced4475535d5d08 Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Thu, 20 Jan 2022 22:51:35 -0600 Subject: [PATCH 6/8] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 5a93e1b..50bf749 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Docker Guacamole +**THIS REPO IS A CONTINUATION OF [oznu/docker-guacamole](https://github.com/oznu/docker-guacamole).** + A Docker Container for [Apache Guacamole](https://guacamole.apache.org/), a client-less remote desktop gateway. It supports standard protocols like VNC, RDP, and SSH over HTML5. This image will run on most platforms that support Docker including Docker for Mac, Docker for Windows, Synology DSM and Raspberry Pi 3 boards. From 5ce96be0ab848902d09820efe565f2f5d990d086 Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Thu, 20 Jan 2022 23:05:22 -0600 Subject: [PATCH 7/8] Remove arm dockerfile --- Dockerfile.raspberry-pi | 77 ----------------------------------------- 1 file changed, 77 deletions(-) delete mode 100644 Dockerfile.raspberry-pi diff --git a/Dockerfile.raspberry-pi b/Dockerfile.raspberry-pi deleted file mode 100644 index 16953d1..0000000 --- a/Dockerfile.raspberry-pi +++ /dev/null @@ -1,77 +0,0 @@ -FROM arm32v5/tomcat:9-jre11 - -ENV ARCH=armhf \ - GUAC_VER=1.3.0 \ - GUACAMOLE_HOME=/app/guacamole \ - PG_MAJOR=9.6 \ - PGDATA=/config/postgres \ - POSTGRES_USER=guacamole \ - POSTGRES_DB=guacamole_db - -# Apply the s6-overlay - -RUN curl -SLO "https://github.com/just-containers/s6-overlay/releases/download/v1.20.0.0/s6-overlay-${ARCH}.tar.gz" \ - && tar -xzf s6-overlay-${ARCH}.tar.gz -C / \ - && tar -xzf s6-overlay-${ARCH}.tar.gz -C /usr ./bin \ - && rm -rf s6-overlay-${ARCH}.tar.gz \ - && mkdir -p ${GUACAMOLE_HOME} \ - ${GUACAMOLE_HOME}/lib \ - ${GUACAMOLE_HOME}/extensions - -WORKDIR ${GUACAMOLE_HOME} - -# Install dependencies -RUN apt-get update && apt-get install -y \ - libcairo2-dev libjpeg62-turbo-dev libpng-dev \ - libossp-uuid-dev libavcodec-dev libavutil-dev \ - libswscale-dev freerdp2-dev libfreerdp-client2-2 libpango1.0-dev \ - libssh2-1-dev libtelnet-dev libvncserver-dev \ - libpulse-dev libssl-dev libvorbis-dev libwebp-dev libwebsockets-dev \ - ghostscript postgresql-${PG_MAJOR} \ - && rm -rf /var/lib/apt/lists/* - -# Link FreeRDP to where guac expects it to be -RUN [ "$ARCH" = "armhf" ] && ln -s /usr/local/lib/freerdp /usr/lib/arm-linux-gnueabihf/freerdp || exit 0 -RUN [ "$ARCH" = "amd64" ] && ln -s /usr/local/lib/freerdp /usr/lib/x86_64-linux-gnu/freerdp || exit 0 - -# Install guacamole-server -RUN curl -SLO "http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/${GUAC_VER}/source/guacamole-server-${GUAC_VER}.tar.gz" \ - && tar -xzf guacamole-server-${GUAC_VER}.tar.gz \ - && cd guacamole-server-${GUAC_VER} \ - && ./configure --enable-allow-freerdp-snapshots \ - && make -j$(getconf _NPROCESSORS_ONLN) \ - && make install \ - && cd .. \ - && rm -rf guacamole-server-${GUAC_VER}.tar.gz guacamole-server-${GUAC_VER} \ - && ldconfig - -# Install guacamole-client and postgres auth adapter -RUN set -x \ - && rm -rf ${CATALINA_HOME}/webapps/ROOT \ - && curl -SLo ${CATALINA_HOME}/webapps/ROOT.war "http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/${GUAC_VER}/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 "http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/${GUAC_VER}/binary/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-${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 set -xe \ - && mkdir ${GUACAMOLE_HOME}/extensions-available \ - && for i in auth-ldap auth-duo auth-header auth-cas auth-openid auth-quickconnect auth-totp; do \ - echo "http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/${GUAC_VER}/binary/guacamole-${i}-${GUAC_VER}.tar.gz" \ - && curl -SLO "http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/${GUAC_VER}/binary/guacamole-${i}-${GUAC_VER}.tar.gz" \ - && tar -xzf guacamole-${i}-${GUAC_VER}.tar.gz \ - && cp guacamole-${i}-${GUAC_VER}/guacamole-${i}-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions-available/ \ - && rm -rf guacamole-${i}-${GUAC_VER} guacamole-${i}-${GUAC_VER}.tar.gz \ - ;done - -ENV PATH=/usr/lib/postgresql/${PG_MAJOR}/bin:$PATH -ENV GUACAMOLE_HOME=/config/guacamole - -WORKDIR /config - -COPY root / - -ENTRYPOINT [ "/init" ] From 969b7e136954056491434d384204f70e6cc43f51 Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Thu, 20 Jan 2022 23:45:29 -0600 Subject: [PATCH 8/8] Add raspi Dockerfile back --- Dockerfile.raspberry-pi | 78 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 Dockerfile.raspberry-pi diff --git a/Dockerfile.raspberry-pi b/Dockerfile.raspberry-pi new file mode 100644 index 0000000..7bdaf2a --- /dev/null +++ b/Dockerfile.raspberry-pi @@ -0,0 +1,78 @@ +FROM arm32v5/tomcat:9-jre11 + +ENV ARCH=armhf \ + GUAC_VER=1.4.0 \ + GUACAMOLE_HOME=/app/guacamole \ + PG_MAJOR=9.6 \ + PGDATA=/config/postgres \ + POSTGRES_USER=guacamole \ + POSTGRES_DB=guacamole_db + + +# Install dependencies +RUN apt-get update && apt-get install -y --allow-unauthenticated \ + libcairo2-dev libjpeg62-turbo-dev libpng-dev \ + libossp-uuid-dev libavcodec-dev libavutil-dev \ + libswscale-dev freerdp2-dev libfreerdp-client2-2 libpango1.0-dev \ + libssh2-1-dev libtelnet-dev libvncserver-dev \ + libpulse-dev libssl-dev libvorbis-dev libwebp-dev libwebsockets-dev \ + ghostscript postgresql-${PG_MAJOR} \ + && rm -rf /var/lib/apt/lists/* + +# Apply the s6-overlay +ADD https://github.com/just-containers/s6-overlay/releases/download/v2.2.0.3/s6-overlay-${ARCH}.tar.gz /tmp +RUN tar -xzf /tmp/s6-overlay-${ARCH}.tar.gz -C / +RUN tar -xzf /tmp/s6-overlay-${ARCH}.tar.gz -C /usr ./bin +RUN rm -rf /tmp/s6-overlay-${ARCH}.tar.gz + +RUN mkdir -p ${GUACAMOLE_HOME} \ + ${GUACAMOLE_HOME}/lib \ + ${GUACAMOLE_HOME}/extensions + +WORKDIR ${GUACAMOLE_HOME} + +# Link FreeRDP to where guac expects it to be +RUN [ "$ARCH" = "armhf" ] && ln -s /usr/local/lib/freerdp /usr/lib/arm-linux-gnueabihf/freerdp || exit 0 +RUN [ "$ARCH" = "amd64" ] && ln -s /usr/local/lib/freerdp /usr/lib/x86_64-linux-gnu/freerdp || exit 0 + +# Install guacamole-server +RUN curl -SLOk "http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/${GUAC_VER}/source/guacamole-server-${GUAC_VER}.tar.gz" \ + && tar -xzf guacamole-server-${GUAC_VER}.tar.gz \ + && cd guacamole-server-${GUAC_VER} \ + && ./configure --enable-allow-freerdp-snapshots \ + && make -j$(getconf _NPROCESSORS_ONLN) \ + && make install \ + && cd .. \ + && rm -rf guacamole-server-${GUAC_VER}.tar.gz guacamole-server-${GUAC_VER} \ + && ldconfig + +# Install guacamole-client and postgres auth adapter +RUN set -x \ + && rm -rf ${CATALINA_HOME}/webapps/ROOT \ + && curl -SLko ${CATALINA_HOME}/webapps/ROOT.war "http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/${GUAC_VER}/binary/guacamole-${GUAC_VER}.war" \ + && curl -SLko ${GUACAMOLE_HOME}/lib/postgresql-42.1.4.jar "https://jdbc.postgresql.org/download/postgresql-42.2.24.jar" \ + && curl -SLkO "http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/${GUAC_VER}/binary/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-${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 set -xe \ + && mkdir ${GUACAMOLE_HOME}/extensions-available \ + && for i in auth-ldap auth-duo auth-header auth-cas auth-openid auth-quickconnect auth-totp; do \ + echo "https://dlcdn.apache.org/guacamole/${GUAC_VER}/binary/guacamole-${i}-${GUAC_VER}.tar.gz" \ + && curl -SLOk "https://dlcdn.apache.org/guacamole/${GUAC_VER}/binary/guacamole-${i}-${GUAC_VER}.tar.gz" \ + && tar -xzf guacamole-${i}-${GUAC_VER}.tar.gz \ + && cp guacamole-${i}-${GUAC_VER}/guacamole-${i}-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions-available/ \ + && rm -rf guacamole-${i}-${GUAC_VER} guacamole-${i}-${GUAC_VER}.tar.gz \ + ;done + +ENV PATH=/usr/lib/postgresql/${PG_MAJOR}/bin:$PATH +ENV GUACAMOLE_HOME=/config/guacamole + +WORKDIR /config + +COPY root / + +ENTRYPOINT [ "/init" ]