2016-05-20 21:45:12 +00:00
|
|
|
#
|
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one
|
|
|
|
# or more contributor license agreements. See the NOTICE file
|
|
|
|
# distributed with this work for additional information
|
|
|
|
# regarding copyright ownership. The ASF licenses this file
|
|
|
|
# to you under the Apache License, Version 2.0 (the
|
|
|
|
# "License"); you may not use this file except in compliance
|
|
|
|
# with the License. You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing,
|
|
|
|
# software distributed under the License is distributed on an
|
|
|
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
|
|
# KIND, either express or implied. See the License for the
|
|
|
|
# specific language governing permissions and limitations
|
|
|
|
# under the License.
|
|
|
|
#
|
|
|
|
|
|
|
|
#
|
|
|
|
# Dockerfile for guacamole-server
|
|
|
|
#
|
|
|
|
|
2017-12-06 12:57:12 +00:00
|
|
|
|
2018-04-02 04:24:50 +00:00
|
|
|
# Use Debian as base for the build
|
|
|
|
ARG DEBIAN_VERSION=stable
|
|
|
|
FROM debian:${DEBIAN_VERSION} AS builder
|
2017-12-06 12:57:12 +00:00
|
|
|
|
|
|
|
# Base directory for installed build artifacts.
|
|
|
|
# Due to limitations of the Docker image build process, this value is
|
|
|
|
# duplicated in an ARG in the second stage of the build.
|
|
|
|
#
|
|
|
|
ARG PREFIX_DIR=/usr/local/guacamole
|
|
|
|
|
|
|
|
# Build arguments
|
|
|
|
ARG BUILD_DIR=/tmp/guacd-docker-BUILD
|
|
|
|
ARG BUILD_DEPENDENCIES=" \
|
2016-08-26 19:56:41 +00:00
|
|
|
autoconf \
|
|
|
|
automake \
|
|
|
|
gcc \
|
2018-02-08 20:40:15 +00:00
|
|
|
libcairo2-dev \
|
|
|
|
libfreerdp-dev \
|
2018-04-02 04:24:50 +00:00
|
|
|
libjpeg62-turbo-dev \
|
2018-02-08 20:40:15 +00:00
|
|
|
libossp-uuid-dev \
|
|
|
|
libpango1.0-dev \
|
|
|
|
libpulse-dev \
|
|
|
|
libssh2-1-dev \
|
|
|
|
libssl-dev \
|
|
|
|
libtelnet-dev \
|
2016-08-26 19:56:41 +00:00
|
|
|
libtool \
|
2018-02-08 20:40:15 +00:00
|
|
|
libvncserver-dev \
|
2018-09-27 02:36:55 +00:00
|
|
|
libwebsockets-dev \
|
2018-02-08 20:40:15 +00:00
|
|
|
libwebp-dev \
|
|
|
|
make"
|
2016-05-20 21:45:12 +00:00
|
|
|
|
2017-12-06 12:57:12 +00:00
|
|
|
# Bring build environment up to date and install build dependencies
|
2018-02-08 20:40:15 +00:00
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y $BUILD_DEPENDENCIES && \
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
2016-05-20 21:45:12 +00:00
|
|
|
|
|
|
|
# Add configuration scripts
|
2018-02-09 00:29:07 +00:00
|
|
|
COPY src/guacd-docker/bin "${PREFIX_DIR}/bin/"
|
2016-05-20 21:45:12 +00:00
|
|
|
|
2016-08-26 19:56:41 +00:00
|
|
|
# Copy source to container for sake of build
|
|
|
|
COPY . "$BUILD_DIR"
|
|
|
|
|
|
|
|
# Build guacamole-server from local source
|
2018-02-09 00:29:07 +00:00
|
|
|
RUN ${PREFIX_DIR}/bin/build-guacd.sh "$BUILD_DIR" "$PREFIX_DIR"
|
|
|
|
|
|
|
|
# Record the packages of all runtime library dependencies
|
|
|
|
RUN ${PREFIX_DIR}/bin/list-dependencies.sh \
|
|
|
|
${PREFIX_DIR}/sbin/guacd \
|
|
|
|
${PREFIX_DIR}/lib/libguac-client-*.so \
|
|
|
|
${PREFIX_DIR}/lib/freerdp/guac*.so \
|
|
|
|
> ${PREFIX_DIR}/DEPENDENCIES
|
2016-05-20 21:45:12 +00:00
|
|
|
|
2018-04-02 04:24:50 +00:00
|
|
|
# Use same Debian as the base for the runtime image
|
|
|
|
FROM debian:${DEBIAN_VERSION}
|
2017-12-06 12:57:12 +00:00
|
|
|
|
|
|
|
# Base directory for installed build artifacts.
|
|
|
|
# Due to limitations of the Docker image build process, this value is
|
|
|
|
# duplicated in an ARG in the first stage of the build. See also the
|
|
|
|
# CMD directive at the end of this build stage.
|
|
|
|
#
|
|
|
|
ARG PREFIX_DIR=/usr/local/guacamole
|
|
|
|
|
|
|
|
# Runtime environment
|
2018-04-02 05:05:06 +00:00
|
|
|
ENV LC_ALL=C.UTF-8
|
2018-04-02 04:50:41 +00:00
|
|
|
ENV LD_LIBRARY_PATH=${PREFIX_DIR}/lib
|
2018-03-28 23:54:07 +00:00
|
|
|
ENV GUACD_LOG_LEVEL=info
|
2017-12-06 12:57:12 +00:00
|
|
|
|
|
|
|
ARG RUNTIME_DEPENDENCIES=" \
|
|
|
|
ghostscript \
|
2018-02-09 00:29:07 +00:00
|
|
|
libfreerdp-plugins-standard \
|
2018-02-08 20:40:15 +00:00
|
|
|
fonts-liberation \
|
|
|
|
fonts-dejavu \
|
|
|
|
xfonts-terminus"
|
2017-12-06 12:57:12 +00:00
|
|
|
|
|
|
|
# Copy build artifacts into this stage
|
|
|
|
COPY --from=builder ${PREFIX_DIR} ${PREFIX_DIR}
|
|
|
|
|
2018-02-09 00:29:07 +00:00
|
|
|
# Bring runtime environment up to date and install runtime dependencies
|
|
|
|
RUN apt-get update && \
|
|
|
|
apt-get install -y $RUNTIME_DEPENDENCIES && \
|
|
|
|
apt-get install -y $(cat "${PREFIX_DIR}"/DEPENDENCIES) && \
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2017-12-06 12:57:12 +00:00
|
|
|
# Link FreeRDP plugins into proper path
|
2018-02-09 00:29:07 +00:00
|
|
|
RUN ${PREFIX_DIR}/bin/link-freerdp-plugins.sh \
|
|
|
|
${PREFIX_DIR}/lib/freerdp/guac*.so
|
2017-12-06 12:57:12 +00:00
|
|
|
|
|
|
|
# Expose the default listener port
|
2016-05-20 21:45:12 +00:00
|
|
|
EXPOSE 4822
|
2017-12-06 12:57:12 +00:00
|
|
|
|
|
|
|
# Start guacd, listening on port 0.0.0.0:4822
|
|
|
|
#
|
|
|
|
# Note the path here MUST correspond to the value specified in the
|
|
|
|
# PREFIX_DIR build argument.
|
|
|
|
#
|
2018-03-29 08:32:06 +00:00
|
|
|
CMD /usr/local/guacamole/sbin/guacd -b 0.0.0.0 -L $GUACD_LOG_LEVEL -f
|
2016-05-20 21:45:12 +00:00
|
|
|
|