1

我用docker安装了guacamole和guacadmin,所以我也想用docker安装guacenc,但是没找到资料。

其实我还没有找到其他安装guacenc的方法。如果有人知道,我希望我能得到答案。

非常感谢

4

2 回答 2

1

如果guacamole并且guacadmin可以安装在 linux/windows/Mac OS 上,那么它可以在 docker 中运行。

guacamoledockerhub上的官方docker镜像,大家可以试试。

也检查一下

更新:

要在 centos docker 映像中安装 guacenc,您需要安装必要的软件包,如此所述。

引用链接中的声明。

guacamole-server 提供的用于将屏幕录制转换为视频的 guacenc 实用程序依赖于 FFmpeg,并且只有在至少安装了 FFmpeg 提供的 libavcodec、libavutil 和 libswscale 库后才能构建。


guacenc 使用 FFmpeg 提供的 libavcodec、libavutil 和 libswscale 库在翻译 Guacamole 会话记录时对视频流进行编码。如果没有 FFmpeg,guacenc 实用程序将根本无法构建。

您需要使用安装这些软件包,yum install以便guacenc可以构建和安装实用程序。

希望这可以帮助。

于 2019-07-02T16:52:16.217 回答
-1

此 dockerfile 仅供参考。谢谢

# This is a Dockerfile to build the docker image including guacenc service and ffmpeg utility.
# To reduce docker image size, utilize multi-stage build method and copy shared library file required while executing guacenc. 
# Copying shared library method is inspired by this thread "https://gist.github.com/bcardiff/85ae47e66ff0df35a78697508fcb49af"

# mutlti-stage builds ref#
# https://docs.docker.com/develop/develop-images/multistage-build/
# https://docs.docker.com/develop/develop-images/dockerfile_best-practices/

# This Dockerfile is built off the https://github.com/apache/guacamole-server Dockerfile.
# In this repo, only Dockerfile provided. If you're about to build your own docker image, download whole project file from the link above.


# Encode existing session recordings to .m4v:
# $ docker exec -it guac_encoder guacenc -f /recordings/file-name-to-encode

# Convert .m4v to .mp4:
# $ docker exec -it guac_encoder ffmpeg -i /recordings/file-name-to-convert.m4v /records/file-name.mp4



# Use Debian as base for the build
ARG DEBIAN_VERSION=stable
FROM debian:${DEBIAN_VERSION} AS builder


ADD . /src
WORKDIR /src

# 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="              \
        autoconf                      \
        automake                      \
        gcc                           \
        libcairo2-dev                 \
        libjpeg62-turbo-dev           \
        libossp-uuid-dev              \
        libpango1.0-dev               \
        libtool                       \
        libwebp-dev                   \
        libavcodec-dev                \
        libavutil-dev                 \
        libswscale-dev                \
        make"

# Bring build environment up to date and install build dependencies
RUN apt-get update                         && \
    apt-get install -y $BUILD_DEPENDENCIES && \
    rm -rf /var/lib/apt/lists/*

# Add configuration scripts
COPY src/guacd-docker/bin "${PREFIX_DIR}/bin/"

# Copy source to container for sake of build
COPY . "$BUILD_DIR"

# Build guacamole-server from local source
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}/DEPENDENCIES

# Copy shared library file for guacenc to src folder located root directory
RUN ldd /usr/local/guacamole/bin/guacenc | tr -s '[:blank:]' '\n' | grep '^/' | \
    xargs -I % sh -c 'mkdir -p $(dirname deps%); cp % deps%;'

#####################################################################
# Use same Debian as the base for the runtime image
FROM jrottenberg/ffmpeg:4.1-alpine

# Override existing ffmpeg ENTRYPOINT
ENTRYPOINT []

# 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
ENV LC_ALL=C.UTF-8
ENV LD_LIBRARY_PATH ${PREFIX_DIR}/lib:$LD_LIBRARY_PATH
ENV PATH ${PREFIX_DIR}/bin:$PATH

# Copy guacenc and lib
COPY --from=builder ${PREFIX_DIR} ${PREFIX_DIR}
# Copy shared library required while executing guacenc
COPY --from=builder /src/deps /

# # Bring runtime environment up to date and install runtime dependencies
# RUN apt-get update                                          && \
#     apt-get install -y $(cat "${PREFIX_DIR}"/DEPENDENCIES)  && \
#     rm -rf /var/lib/apt/lists/*
于 2020-07-17T01:44:43.547 回答