forked from oznu/docker-guacamole
-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Dockerfile.base
61 lines (50 loc) · 2.18 KB
/
Dockerfile.base
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
FROM tomcat:9.0.93-jdk17-temurin-noble
ARG TARGETPLATFORM
ENV GUAC_VER=1.5.5 \
GUACAMOLE_HOME=/app/guacamole \
PG_VER=9.6.24 \
LIBSSH2_VER=1.11.0 \
PGDATA=/config/postgres \
POSTGRES_USER=guacamole \
POSTGRES_DB=guacamole_db
# Add user for postgres
RUN useradd postgres
# Cleanup default tomcat stuff
RUN rm -rf /usr/local/tomcat/webapps.dist
RUN echo $TARGETPLATFORM
# Apply the s6-overlay
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then ARCHITECTURE=amd64; elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then ARCHITECTURE=armhf; elif [ "$TARGETPLATFORM" = "linux/arm/v8" ]; then ARCHITECTURE=aarch64; elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then ARCHITECTURE=aarch64; fi \
&& curl -sS -L -O --output-dir /tmp/ --create-dirs "https://github.com/just-containers/s6-overlay/releases/download/v2.2.0.3/s6-overlay-${ARCHITECTURE}-installer" \
&& chmod +x /tmp/s6-overlay-${ARCHITECTURE}-installer && /tmp/s6-overlay-${ARCHITECTURE}-installer / \
&& rm -rf /tmp/s6-overlay-${ARCHITECTURE}-installer
# make dirs for guacamole install
RUN mkdir -p ${GUACAMOLE_HOME} \
${GUACAMOLE_HOME}/lib \
${GUACAMOLE_HOME}/extensions
# Install dependencies
RUN apt-get update \
&& 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 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/*
# Download libssh2 and postgresql source
ADD https://www.libssh2.org/download/libssh2-${LIBSSH2_VER}.tar.gz /tmp
ADD https://ftp.postgresql.org/pub/source/v${PG_VER}/postgresql-${PG_VER}.tar.gz /tmp
# Build & install libssh2
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
RUN tar -xzvf /tmp/postgresql-${PG_VER}.tar.gz \
&& cd postgresql-${PG_VER} \
&& ./configure \
&& make \
&& make install \
&& rm -rf /tmp/postgresql-${PG_VER}*