Compare commits

...

19 Commits

Author SHA1 Message Date
jwetzell cabf2a5eca test removing postgres extension 2024-01-13 22:03:13 -06:00
jwetzell 3c7acbab48 Merge pull request #29 from jwetzell/rpi-1.5.x
raspberry pi image now builds and runs 1.5.x
2023-12-19 22:00:24 -06:00
jwetzell c602be9111 raspberry pi image now builds and runs 1.5.x 2023-12-19 21:58:46 -06:00
jwetzell 8d1898929f cleanup apt install 2023-12-19 21:55:44 -06:00
jwetzell 916997c62b fix duplicate in apt install 2023-12-19 15:19:32 -06:00
jwetzell b65c495492 fix duplicate in apt install 2023-12-19 15:19:19 -06:00
jwetzell 38f7cf7c41 Merge pull request #28 from jwetzell/psql-from-source
install postgresql from source
2023-12-19 15:12:42 -06:00
Joel Wetzell 7fae4045a7 install pgsql from source 2023-12-19 15:10:45 -06:00
Joel Wetzell 99294c461e make libssh2 version an env variable 2023-12-19 14:15:47 -06:00
jwetzell 255d5c6d0a Merge pull request #27 from scottgrobinson/master 2023-12-19 13:47:10 -06:00
Scott Robinson 96a36dcf18 Manually build and install libssh2 2023-12-19 19:30:12 +00:00
Joel Wetzell 5aeace57a7 update to 1.5.4 2023-12-13 11:52:58 -06:00
jwetzell d6aa86d06f update 64 bit to 1.5.3 2023-08-10 19:24:54 -05:00
Joel Wetzell 79b8a4a538 split dockerfiles and update URLs 2023-06-08 14:18:17 -05:00
Joel Wetzell 19878a35ed bump version in regular dockerfile 2023-05-30 13:27:28 -05:00
Joel Wetzell 4864d3f54c update to 1.5.1 2023-05-17 13:34:06 -05:00
Joel Wetzell aee7baea37 add libraries for avenc 2023-02-24 09:49:13 -06:00
jwetzell a7dfed307d update postgresql repo import 2023-02-23 10:01:14 -06:00
Joel Wetzell cf893c5b32 update raspberry pi Dockerfile 2023-02-22 13:56:29 -06:00
8 changed files with 235 additions and 98 deletions
+108
View File
@@ -0,0 +1,108 @@
FROM library/tomcat:9-jre11-openjdk-bullseye
ENV ARCH=amd64 \
GUAC_VER=1.5.4 \
GUACAMOLE_HOME=/app/guacamole \
LIBSSH2_VER=1.11.0
# Install dependencies
RUN apt-get update \
&& apt-get install -y curl ca-certificates gnupg \
libcairo2-dev libjpeg62-turbo-dev libpng-dev libavformat-dev \
libossp-uuid-dev libavcodec-dev libavutil-dev \
libswscale-dev freerdp2-dev libfreerdp-client2-2 libpango1.0-dev \
libtelnet-dev libvncserver-dev \
libpulse-dev libssl-dev libvorbis-dev libwebp-dev libwebsockets-dev \
ghostscript build-essential libreadline-dev \
&& rm -rf /var/lib/apt/lists/*
# Build & install libssh2
ADD https://www.libssh2.org/download/libssh2-${LIBSSH2_VER}.tar.gz /tmp
RUN tar -xzvf /tmp/libssh2-${LIBSSH2_VER}.tar.gz \
&& cd libssh2-${LIBSSH2_VER} \
&& ./configure \
&& make \
&& make install \
&& rm -rf /tmp/libssh2-${LIBSSH2_VER}*
# Apply the s6-overlay
ADD https://github.com/just-containers/s6-overlay/releases/download/v2.2.0.3/s6-overlay-amd64.tar.gz /tmp
RUN tar -xzf /tmp/s6-overlay-amd64.tar.gz -C / \
&& tar -xzf /tmp/s6-overlay-amd64.tar.gz -C /usr ./bin \
&& rm -rf /tmp/s6-overlay-amd64.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 ln -s /usr/local/lib/freerdp /usr/lib/x86_64-linux-gnu/freerdp || exit 0
# Install guacamole-server
RUN curl -SLO "https://archive.apache.org/dist/guacamole/${GUAC_VER}/source/guacamole-server-${GUAC_VER}.tar.gz" \
&& tar -xzf guacamole-server-${GUAC_VER}.tar.gz \
&& cd guacamole-server-${GUAC_VER} \
&& export LDFLAGS="-lrt" \
&& ./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
# Create directory for extensions
RUN mkdir ${GUACAMOLE_HOME}/extensions-available
# Install guacamole-client
RUN set -x \
&& rm -rf ${CATALINA_HOME}/webapps/ROOT \
&& curl -SLo ${CATALINA_HOME}/webapps/ROOT.war "https://archive.apache.org/dist/guacamole/${GUAC_VER}/binary/guacamole-${GUAC_VER}.war" \
&& curl -SLO "https://archive.apache.org/dist/guacamole/${GUAC_VER}/binary/guacamole-auth-jdbc-${GUAC_VER}.tar.gz" \
&& tar -xzf guacamole-auth-jdbc-${GUAC_VER}.tar.gz \
&& cp guacamole-auth-jdbc-${GUAC_VER}/postgresql/guacamole-auth-jdbc-postgresql-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions-available/ \
&& cp guacamole-auth-jdbc-${GUAC_VER}/mysql/guacamole-auth-jdbc-mysql-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions-available/ \
&& cp guacamole-auth-jdbc-${GUAC_VER}/sqlserver/guacamole-auth-jdbc-sqlserver-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions-available/ \
&& rm -rf guacamole-auth-jdbc-${GUAC_VER} guacamole-auth-jdbc-${GUAC_VER}.tar.gz
# add auth-sso to available extensions folder structur differs from other extensions
RUN set -xe \
&& echo "https://archive.apache.org/dist/guacamole/${GUAC_VER}/binary/guacamole-auth-sso-${GUAC_VER}.tar.gz" \
&& curl -SLO "https://archive.apache.org/dist/guacamole/${GUAC_VER}/binary/guacamole-auth-sso-${GUAC_VER}.tar.gz" \
&& tar -xzf guacamole-auth-sso-${GUAC_VER}.tar.gz \
&& cp guacamole-auth-sso-${GUAC_VER}/cas/guacamole-auth-sso-cas-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions-available/ \
&& cp guacamole-auth-sso-${GUAC_VER}/openid/guacamole-auth-sso-openid-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions-available/ \
&& cp guacamole-auth-sso-${GUAC_VER}/saml/guacamole-auth-sso-saml-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions-available/ \
&& rm -rf guacamole-auth-sso-${GUAC_VER} guacamole-auth-sso-${GUAC_VER}.tar.gz
# add vault to available extensions folder structur differs from other extensions
RUN set -xe \
&& echo "https://archive.apache.org/dist/guacamole/${GUAC_VER}/binary/guacamole-vault-${GUAC_VER}.tar.gz" \
&& curl -SLO "https://archive.apache.org/dist/guacamole/${GUAC_VER}/binary/guacamole-vault-${GUAC_VER}.tar.gz" \
&& tar -xzf guacamole-vault-${GUAC_VER}.tar.gz \
&& cp guacamole-vault-${GUAC_VER}/ksm/guacamole-vault-ksm-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions-available/ \
&& rm -rf guacamole-vault-${GUAC_VER} guacamole-vault-${GUAC_VER}.tar.gz
# Add optional extensions
RUN set -xe \
&& for i in auth-duo auth-header auth-json auth-ldap auth-quickconnect auth-totp history-recording-storage; do \
echo "https://archive.apache.org/dist/guacamole/${GUAC_VER}/binary/guacamole-${i}-${GUAC_VER}.tar.gz" \
&& curl -SLO "https://archive.apache.org/dist/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/local/pgsql/bin:$PATH"
ENV GUACAMOLE_HOME=/config/guacamole
WORKDIR /config
COPY root /
EXPOSE 8080
ENTRYPOINT [ "/init" ]
+43 -30
View File
@@ -1,34 +1,48 @@
FROM library/tomcat:9-jre11-openjdk-bullseye
ENV ARCH=amd64 \
GUAC_VER=1.5.0 \
ENV GUAC_VER=1.5.4 \
GUACAMOLE_HOME=/app/guacamole \
PG_MAJOR=9.6 \
PG_VER=9.6.24 \
LIBSSH2_VER=1.11.0 \
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 && \
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 \
&& apt-get install -y curl ca-certificates gnupg \
libcairo2-dev libjpeg62-turbo-dev libpng-dev libavformat-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 \
libtelnet-dev libvncserver-dev \
libpulse-dev libssl-dev libvorbis-dev libwebp-dev libwebsockets-dev \
ghostscript build-essential postgresql-${PG_MAJOR} \
&& rm -rf /var/lib/apt/lists/*
ghostscript build-essential libreadline-dev
# Build & install libssh2
ADD https://www.libssh2.org/download/libssh2-${LIBSSH2_VER}.tar.gz /tmp
RUN tar -xzvf /tmp/libssh2-${LIBSSH2_VER}.tar.gz \
&& cd libssh2-${LIBSSH2_VER} \
&& ./configure \
&& make \
&& make install \
&& rm -rf /tmp/libssh2-${LIBSSH2_VER}*
# Build & install postgresql
ADD https://ftp.postgresql.org/pub/source/v${PG_VER}/postgresql-${PG_VER}.tar.gz /tmp
RUN tar -xzvf /tmp/postgresql-${PG_VER}.tar.gz \
&& cd postgresql-${PG_VER} \
&& ./configure \
&& make \
&& make install \
&& rm -rf /tmp/postgresql-${PG_VER}*
RUN useradd postgres
# 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 / \
&& tar -xzf /tmp/s6-overlay-${ARCH}.tar.gz -C /usr ./bin \
&& rm -rf /tmp/s6-overlay-${ARCH}.tar.gz
ADD https://github.com/just-containers/s6-overlay/releases/download/v2.2.0.3/s6-overlay-armhf.tar.gz /tmp
RUN tar -xzf /tmp/s6-overlay-armhf.tar.gz -C / \
&& tar -xzf /tmp/s6-overlay-armhf.tar.gz -C /usr ./bin \
&& rm -rf /tmp/s6-overlay-armhf.tar.gz
RUN mkdir -p ${GUACAMOLE_HOME} \
${GUACAMOLE_HOME}/lib \
@@ -37,15 +51,14 @@ RUN mkdir -p ${GUACAMOLE_HOME} \
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
RUN ln -s /usr/local/lib/freerdp /usr/lib/arm-linux-gnueabihf/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" \
RUN curl -SLO "https://archive.apache.org/dist/guacamole/${GUAC_VER}/source/guacamole-server-${GUAC_VER}.tar.gz" \
&& tar -xzf guacamole-server-${GUAC_VER}.tar.gz \
&& cd guacamole-server-${GUAC_VER} \
&& export LDFLAGS="-lrt" \
&& ./configure --enable-allow-freerdp-snapshots \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
@@ -59,9 +72,9 @@ RUN mkdir ${GUACAMOLE_HOME}/extensions-available
# 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 ${CATALINA_HOME}/webapps/ROOT.war "https://archive.apache.org/dist/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.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" \
&& curl -SLO "https://archive.apache.org/dist/guacamole/${GUAC_VER}/binary/guacamole-auth-jdbc-${GUAC_VER}.tar.gz" \
&& tar -xzf guacamole-auth-jdbc-${GUAC_VER}.tar.gz \
&& cp guacamole-auth-jdbc-${GUAC_VER}/postgresql/guacamole-auth-jdbc-postgresql-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions/ \
&& cp guacamole-auth-jdbc-${GUAC_VER}/postgresql/guacamole-auth-jdbc-postgresql-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions-available/ \
@@ -72,8 +85,8 @@ RUN set -x \
# add auth-sso to available extensions folder structur differs from other extensions
RUN set -xe \
&& echo "https://dlcdn.apache.org/guacamole/${GUAC_VER}/binary/guacamole-auth-sso-${GUAC_VER}.tar.gz" \
&& curl -SLO "https://dlcdn.apache.org/guacamole/${GUAC_VER}/binary/guacamole-auth-sso-${GUAC_VER}.tar.gz" \
&& echo "https://archive.apache.org/dist/guacamole/${GUAC_VER}/binary/guacamole-auth-sso-${GUAC_VER}.tar.gz" \
&& curl -SLO "https://archive.apache.org/dist/guacamole/${GUAC_VER}/binary/guacamole-auth-sso-${GUAC_VER}.tar.gz" \
&& tar -xzf guacamole-auth-sso-${GUAC_VER}.tar.gz \
&& cp guacamole-auth-sso-${GUAC_VER}/cas/guacamole-auth-sso-cas-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions-available/ \
&& cp guacamole-auth-sso-${GUAC_VER}/openid/guacamole-auth-sso-openid-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions-available/ \
@@ -82,8 +95,8 @@ RUN set -xe \
# add vault to available extensions folder structur differs from other extensions
RUN set -xe \
&& echo "https://dlcdn.apache.org/guacamole/${GUAC_VER}/binary/guacamole-vault-${GUAC_VER}.tar.gz" \
&& curl -SLO "https://dlcdn.apache.org/guacamole/${GUAC_VER}/binary/guacamole-vault-${GUAC_VER}.tar.gz" \
&& echo "https://archive.apache.org/dist/guacamole/${GUAC_VER}/binary/guacamole-vault-${GUAC_VER}.tar.gz" \
&& curl -SLO "https://archive.apache.org/dist/guacamole/${GUAC_VER}/binary/guacamole-vault-${GUAC_VER}.tar.gz" \
&& tar -xzf guacamole-vault-${GUAC_VER}.tar.gz \
&& cp guacamole-vault-${GUAC_VER}/ksm/guacamole-vault-ksm-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions-available/ \
&& rm -rf guacamole-vault-${GUAC_VER} guacamole-vault-${GUAC_VER}.tar.gz
@@ -91,14 +104,14 @@ RUN set -xe \
# Add optional extensions
RUN set -xe \
&& for i in auth-duo auth-header auth-json auth-ldap auth-quickconnect auth-totp history-recording-storage; do \
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" \
echo "https://archive.apache.org/dist/guacamole/${GUAC_VER}/binary/guacamole-${i}-${GUAC_VER}.tar.gz" \
&& curl -SLO "https://archive.apache.org/dist/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 PATH="/usr/local/pgsql/bin:$PATH"
ENV GUACAMOLE_HOME=/config/guacamole
WORKDIR /config
+56 -23
View File
@@ -1,31 +1,48 @@
FROM arm32v7/tomcat:9-jre11
ENV ARCH=armhf \
GUAC_VER=1.4.0 \
ENV GUAC_VER=1.5.4 \
GUACAMOLE_HOME=/app/guacamole \
PG_MAJOR=9.6 \
PG_VER=9.6.24 \
LIBSSH2_VER=1.11.0 \
PGDATA=/config/postgres \
POSTGRES_USER=guacamole \
POSTGRES_DB=guacamole_db
# Install base dependencies
RUN apt-get update \
&& apt-get install -y --allow-unauthenticated \
libcairo2-dev libjpeg62-turbo-dev libpng-dev \
&& apt-get install -y curl ca-certificates gnupg \
libcairo2-dev libjpeg-turbo8-dev libpng-dev libavformat-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 \
libtelnet-dev libvncserver-dev \
libpulse-dev libssl-dev libvorbis-dev libwebp-dev libwebsockets-dev \
ghostscript
ghostscript build-essential libreadline-dev
# Install Postgres
RUN apt-get install -y postgresql-${PG_MAJOR}
# Build & install libssh2
ADD https://www.libssh2.org/download/libssh2-${LIBSSH2_VER}.tar.gz /tmp
RUN tar -xzvf /tmp/libssh2-${LIBSSH2_VER}.tar.gz \
&& cd libssh2-${LIBSSH2_VER} \
&& ./configure \
&& make \
&& make install \
&& rm -rf /tmp/libssh2-${LIBSSH2_VER}*
# Build & install postgresql
ADD https://ftp.postgresql.org/pub/source/v${PG_VER}/postgresql-${PG_VER}.tar.gz /tmp
RUN tar -xzvf /tmp/postgresql-${PG_VER}.tar.gz \
&& cd postgresql-${PG_VER} \
&& ./configure \
&& make \
&& make install \
&& rm -rf /tmp/postgresql-${PG_VER}*
RUN useradd postgres
# 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 / \
&& tar -xzf /tmp/s6-overlay-${ARCH}.tar.gz -C /usr ./bin \
&& rm -rf /tmp/s6-overlay-${ARCH}.tar.gz
ADD https://github.com/just-containers/s6-overlay/releases/download/v2.2.0.3/s6-overlay-armhf.tar.gz /tmp
RUN tar -xzf /tmp/s6-overlay-armhf.tar.gz -C / \
&& tar -xzf /tmp/s6-overlay-armhf.tar.gz -C /usr ./bin \
&& rm -rf /tmp/s6-overlay-armhf.tar.gz
RUN mkdir -p ${GUACAMOLE_HOME} \
${GUACAMOLE_HOME}/lib \
@@ -34,11 +51,10 @@ RUN mkdir -p ${GUACAMOLE_HOME} \
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 ln -s /usr/local/lib/freerdp /usr/lib/arm-linux-gnueabihf/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" \
RUN curl -SLOk "https://archive.apache.org/dist/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 \
@@ -51,26 +67,43 @@ RUN curl -SLOk "http://apache.org/dyn/closer.cgi?action=download&filename=guacam
# 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 ${CATALINA_HOME}/webapps/ROOT.war "https://archive.apache.org/dist/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" \
&& curl -SLkO "https://archive.apache.org/dist/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 auth-sso to available extensions folder structur differs from other extensions
RUN set -xe \
&& echo "https://archive.apache.org/dist/guacamole/${GUAC_VER}/binary/guacamole-auth-sso-${GUAC_VER}.tar.gz" \
&& curl -SLO "https://archive.apache.org/dist/guacamole/${GUAC_VER}/binary/guacamole-auth-sso-${GUAC_VER}.tar.gz" \
&& tar -xzf guacamole-auth-sso-${GUAC_VER}.tar.gz \
&& cp guacamole-auth-sso-${GUAC_VER}/cas/guacamole-auth-sso-cas-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions-available/ \
&& cp guacamole-auth-sso-${GUAC_VER}/openid/guacamole-auth-sso-openid-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions-available/ \
&& cp guacamole-auth-sso-${GUAC_VER}/saml/guacamole-auth-sso-saml-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions-available/ \
&& rm -rf guacamole-auth-sso-${GUAC_VER} guacamole-auth-sso-${GUAC_VER}.tar.gz
# add vault to available extensions folder structur differs from other extensions
RUN set -xe \
&& echo "https://archive.apache.org/dist/guacamole/${GUAC_VER}/binary/guacamole-vault-${GUAC_VER}.tar.gz" \
&& curl -SLO "https://archive.apache.org/dist/guacamole/${GUAC_VER}/binary/guacamole-vault-${GUAC_VER}.tar.gz" \
&& tar -xzf guacamole-vault-${GUAC_VER}.tar.gz \
&& cp guacamole-vault-${GUAC_VER}/ksm/guacamole-vault-ksm-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions-available/ \
&& rm -rf guacamole-vault-${GUAC_VER} guacamole-vault-${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" \
&& for i in auth-duo auth-header auth-json auth-ldap auth-quickconnect auth-totp history-recording-storage; do \
echo "https://archive.apache.org/dist/guacamole/${GUAC_VER}/binary/guacamole-${i}-${GUAC_VER}.tar.gz" \
&& curl -SLO "https://archive.apache.org/dist/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 PATH="/usr/local/pgsql/bin:$PATH"
ENV GUACAMOLE_HOME=/config/guacamole
WORKDIR /config
+5 -5
View File
@@ -1,8 +1,8 @@
postgresql-hostname: localhost
postgresql-port: 5432
postgresql-database: guacamole_db
postgresql-username: guacamole
postgresql-password: null
# postgresql-hostname: localhost
# postgresql-port: 5432
# postgresql-database: guacamole_db
# postgresql-username: guacamole
# postgresql-password: null
# ldap-hostname: ldap.example.net
# ldap-port: 389
-13
View File
@@ -1,13 +0,0 @@
#!/usr/bin/with-contenv sh
mkdir -p /config/postgres
mkdir -p /var/run/postgresql
chown postgres:postgres /var/run/postgresql
chown -R postgres:postgres /config/postgres
chmod 0700 /config/postgres
if [ -e /config/postgres/postgresql.conf ]; then
echo "Database already configured"
else
s6-setuidgid postgres initdb
fi
+3 -3
View File
@@ -6,9 +6,9 @@ for i in auth-ldap auth-duo auth-header auth-cas auth-openid auth-quickconnect a
done
# if the guacamole version was bumped, delete the contents of the extensions directory - just on the first run
if [ "$(cat /config/.database-version)" != "$GUAC_VER" ]; then
rm -rf ${GUACAMOLE_HOME}/extensions/*
fi
# if [ "$(cat /config/.database-version)" != "$GUAC_VER" ]; then
# rm -rf ${GUACAMOLE_HOME}/extensions/*
# fi
# enable extensions
for i in $(echo "$EXTENSIONS" | tr "," " "); do
+20 -20
View File
@@ -1,29 +1,29 @@
#!/usr/bin/with-contenv sh
until pg_isready; do
echo "Waiting for postgres to come up..."
sleep 1
done
# until pg_isready; do
# echo "Waiting for postgres to come up..."
# sleep 1
# done
# Create database if it does not exist
psql -U postgres -lqt | cut -d \| -f 1 | grep -qw $POSTGRES_DB
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 "$GUAC_VER" > /config/.database-version
# psql -U postgres -lqt | cut -d \| -f 1 | grep -qw $POSTGRES_DB
# 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 "$GUAC_VER" > /config/.database-version
/etc/cont-init.d/30-defaults.sh
/etc/cont-init.d/50-extensions
else
if [ "$(cat /config/.database-version)" != "$GUAC_VER" ]; then
cat /app/guacamole/schema/upgrade/upgrade-pre-$GUAC_VER.sql | psql -U $POSTGRES_USER -d $POSTGRES_DB -f -
echo "$GUAC_VER" > /config/.database-version
# /etc/cont-init.d/30-defaults.sh
# /etc/cont-init.d/50-extensions
# else
# if [ "$(cat /config/.database-version)" != "$GUAC_VER" ]; then
# cat /app/guacamole/schema/upgrade/upgrade-pre-$GUAC_VER.sql | psql -U $POSTGRES_USER -d $POSTGRES_DB -f -
# echo "$GUAC_VER" > /config/.database-version
/etc/cont-init.d/30-defaults.sh
/etc/cont-init.d/50-extensions
fi
fi
# /etc/cont-init.d/30-defaults.sh
# /etc/cont-init.d/50-extensions
# fi
# fi
echo "Starting guacamole client..."
s6-setuidgid root catalina.sh run
-4
View File
@@ -1,4 +0,0 @@
#!/usr/bin/with-contenv sh
echo "Starting postgres..."
s6-setuidgid postgres postgres