mirror of
https://github.com/jwetzell/docker-guacamole.git
synced 2026-09-11 09:09:34 +00:00
Dockerfile formattinh
This commit is contained in:
+21
-20
@@ -1,19 +1,20 @@
|
|||||||
FROM library/tomcat:9-jre11
|
FROM library/tomcat:9-jre11
|
||||||
|
|
||||||
ENV ARCH=amd64 \
|
ENV ARCH=amd64 \
|
||||||
GUAC_VER=1.4.0 \
|
GUAC_VER=1.4.0 \
|
||||||
GUACAMOLE_HOME=/app/guacamole \
|
GUACAMOLE_HOME=/app/guacamole \
|
||||||
PG_MAJOR=9.6 \
|
PG_MAJOR=9.6 \
|
||||||
PGDATA=/config/postgres \
|
PGDATA=/config/postgres \
|
||||||
POSTGRES_USER=guacamole \
|
POSTGRES_USER=guacamole \
|
||||||
POSTGRES_DB=guacamole_db
|
POSTGRES_DB=guacamole_db
|
||||||
|
|
||||||
# Add Postgres Repository
|
# Add Postgres Repository
|
||||||
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ bullseye-pgdg main" >> /etc/apt/sources.list.d/pgdg.list
|
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 -
|
wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | apt-key add -
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y \
|
||||||
libcairo2-dev libjpeg62-turbo-dev libpng-dev \
|
libcairo2-dev libjpeg62-turbo-dev libpng-dev \
|
||||||
libossp-uuid-dev libavcodec-dev libavutil-dev \
|
libossp-uuid-dev libavcodec-dev libavutil-dev \
|
||||||
libswscale-dev freerdp2-dev libfreerdp-client2-2 libpango1.0-dev \
|
libswscale-dev freerdp2-dev libfreerdp-client2-2 libpango1.0-dev \
|
||||||
@@ -25,9 +26,9 @@ RUN apt-get update && apt-get install -y \
|
|||||||
|
|
||||||
# Apply the s6-overlay
|
# Apply the s6-overlay
|
||||||
ADD https://github.com/just-containers/s6-overlay/releases/download/v2.2.0.3/s6-overlay-${ARCH}.tar.gz /tmp
|
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 / \
|
||||||
RUN tar -xzf /tmp/s6-overlay-${ARCH}.tar.gz -C /usr ./bin
|
&& tar -xzf /tmp/s6-overlay-${ARCH}.tar.gz -C /usr ./bin \
|
||||||
RUN rm -rf /tmp/s6-overlay-${ARCH}.tar.gz
|
&& rm -rf /tmp/s6-overlay-${ARCH}.tar.gz
|
||||||
|
|
||||||
RUN mkdir -p ${GUACAMOLE_HOME} \
|
RUN mkdir -p ${GUACAMOLE_HOME} \
|
||||||
${GUACAMOLE_HOME}/lib \
|
${GUACAMOLE_HOME}/lib \
|
||||||
@@ -43,14 +44,14 @@ RUN echo $PATH
|
|||||||
|
|
||||||
# Install guacamole-server
|
# 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 "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 \
|
&& tar -xzf guacamole-server-${GUAC_VER}.tar.gz \
|
||||||
&& cd guacamole-server-${GUAC_VER} \
|
&& cd guacamole-server-${GUAC_VER} \
|
||||||
&& ./configure --enable-allow-freerdp-snapshots \
|
&& ./configure --enable-allow-freerdp-snapshots \
|
||||||
&& make -j$(getconf _NPROCESSORS_ONLN) \
|
&& make -j$(getconf _NPROCESSORS_ONLN) \
|
||||||
&& make install \
|
&& make install \
|
||||||
&& cd .. \
|
&& cd .. \
|
||||||
&& rm -rf guacamole-server-${GUAC_VER}.tar.gz guacamole-server-${GUAC_VER} \
|
&& rm -rf guacamole-server-${GUAC_VER}.tar.gz guacamole-server-${GUAC_VER} \
|
||||||
&& ldconfig
|
&& ldconfig
|
||||||
|
|
||||||
# Install guacamole-client and postgres auth adapter
|
# Install guacamole-client and postgres auth adapter
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
|
|||||||
+22
-23
@@ -1,17 +1,16 @@
|
|||||||
FROM arm32v7/tomcat:9-jre11
|
FROM arm32v7/tomcat:9-jre11
|
||||||
|
|
||||||
ENV ARCH=armhf \
|
ENV ARCH=armhf \
|
||||||
GUAC_VER=1.4.0 \
|
GUAC_VER=1.4.0 \
|
||||||
GUACAMOLE_HOME=/app/guacamole \
|
GUACAMOLE_HOME=/app/guacamole \
|
||||||
PG_MAJOR=9.6 \
|
PG_MAJOR=9.6 \
|
||||||
PGDATA=/config/postgres \
|
PGDATA=/config/postgres \
|
||||||
POSTGRES_USER=guacamole \
|
POSTGRES_USER=guacamole \
|
||||||
POSTGRES_DB=guacamole_db
|
POSTGRES_DB=guacamole_db
|
||||||
|
|
||||||
# Install dependencies
|
# Install base dependencies
|
||||||
RUN apt-get update
|
RUN apt-get update \
|
||||||
|
&& apt-get install -y --allow-unauthenticated \
|
||||||
RUN apt-get install -y --allow-unauthenticated \
|
|
||||||
libcairo2-dev libjpeg62-turbo-dev libpng-dev \
|
libcairo2-dev libjpeg62-turbo-dev libpng-dev \
|
||||||
libossp-uuid-dev libavcodec-dev libavutil-dev \
|
libossp-uuid-dev libavcodec-dev libavutil-dev \
|
||||||
libswscale-dev freerdp2-dev libfreerdp-client2-2 libpango1.0-dev \
|
libswscale-dev freerdp2-dev libfreerdp-client2-2 libpango1.0-dev \
|
||||||
@@ -24,9 +23,9 @@ RUN apt-get install -y postgresql-${PG_MAJOR}
|
|||||||
|
|
||||||
# Apply the s6-overlay
|
# Apply the s6-overlay
|
||||||
ADD https://github.com/just-containers/s6-overlay/releases/download/v2.2.0.3/s6-overlay-${ARCH}.tar.gz /tmp
|
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 / \
|
||||||
RUN tar -xzf /tmp/s6-overlay-${ARCH}.tar.gz -C /usr ./bin
|
&& tar -xzf /tmp/s6-overlay-${ARCH}.tar.gz -C /usr ./bin \
|
||||||
RUN rm -rf /tmp/s6-overlay-${ARCH}.tar.gz
|
&& rm -rf /tmp/s6-overlay-${ARCH}.tar.gz
|
||||||
|
|
||||||
RUN mkdir -p ${GUACAMOLE_HOME} \
|
RUN mkdir -p ${GUACAMOLE_HOME} \
|
||||||
${GUACAMOLE_HOME}/lib \
|
${GUACAMOLE_HOME}/lib \
|
||||||
@@ -51,19 +50,19 @@ RUN curl -SLOk "http://apache.org/dyn/closer.cgi?action=download&filename=guacam
|
|||||||
|
|
||||||
# Install guacamole-client and postgres auth adapter
|
# Install guacamole-client and postgres auth adapter
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
&& rm -rf ${CATALINA_HOME}/webapps/ROOT \
|
&& 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 "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 ${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 "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 \
|
&& 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/guacamole-auth-jdbc-postgresql-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions/ \
|
||||||
&& cp -R guacamole-auth-jdbc-${GUAC_VER}/postgresql/schema ${GUACAMOLE_HOME}/ \
|
&& 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
|
&& rm -rf guacamole-auth-jdbc-${GUAC_VER} guacamole-auth-jdbc-${GUAC_VER}.tar.gz
|
||||||
|
|
||||||
# Add optional extensions
|
# Add optional extensions
|
||||||
RUN set -xe \
|
RUN set -xe \
|
||||||
&& mkdir ${GUACAMOLE_HOME}/extensions-available \
|
&& mkdir ${GUACAMOLE_HOME}/extensions-available \
|
||||||
&& for i in auth-ldap auth-duo auth-header auth-cas auth-openid auth-quickconnect auth-totp; do \
|
&& 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" \
|
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" \
|
&& curl -SLOk "https://dlcdn.apache.org/guacamole/${GUAC_VER}/binary/guacamole-${i}-${GUAC_VER}.tar.gz" \
|
||||||
&& tar -xzf guacamole-${i}-${GUAC_VER}.tar.gz \
|
&& tar -xzf guacamole-${i}-${GUAC_VER}.tar.gz \
|
||||||
|
|||||||
Reference in New Issue
Block a user