Skip to content

Instantly share code, notes, and snippets.

@kmahyyg
Last active November 22, 2021 01:31
Show Gist options
  • Save kmahyyg/cf751feb3326e85e55f5b743f2d53271 to your computer and use it in GitHub Desktop.
Save kmahyyg/cf751feb3326e85e55f5b743f2d53271 to your computer and use it in GitHub Desktop.
guacamole-guacd (fix libssh issue, compile against latest library, working)

Prebuilt image

docker pull ghcr.io/kmahyyg/guacamole-guacd:1.3.0-archlinux

Just switched to Arch Linux based image, and replaced some library. Others are the same as official image.

It's dirty.

This image doesn't consider of the user outside China due to the special network environment issue.

For global users, please remove the lines which change /etc/pacman.d/mirrorlist and switch archlinuxcn repo mirror to another server.

This image doesn't consider of image size due to laziness since I wanna use AUR helper to simplify my work.

This image doesn't consider the correct usage of sudo since it's a container. (I know I should not use sudo here)

It's tested in some ways.

It is not tested since today is a holiday. My working machine who has problem running official image is turned off. Test result will be updated once Monday.

Main functionality used by myself is working. If something broke, leave a comment here.

FROM archlinux:base-devel
LABEL MAINTAINER="kmahyyg <16604643+kmahyyg@users.noreply.github.com>"
LABEL DESCRIPTION="Apache Guacamole - guacd based on Arch Linux"
LABEL VERSION="v20211120-guacd-1.3.0"
ENV GUACD_LOG_LEVEL=info
COPY write-archcn.sh /build/write-archcn.sh
COPY write-sudoer.sh /build/write-sudoer.sh
RUN chmod 0755 /build/*.sh && \
/build/write-archcn.sh && \
pacman-key --init && \
pacman-key --populate archlinux && \
pacman -Syu --noconfirm archlinuxcn-keyring && \
pacman -S --noconfirm ttf-cascadia-code libssh libwebsockets libvncserver freerdp paru ttf-inconsolata && \
groupadd --gid 1001 guacd && \
useradd --uid 1001 --gid 1001 --system --create-home guacd && \
/build/write-sudoer.sh && \
pacman -Scc --noconfirm
USER guacd
RUN paru -S --noconfirm guacamole-server
USER root
RUN pacman -Scc --noconfirm && \
rm -rf $HOME/.cache/paru && \
rm -rf /var/cache/pacman/pkg/* && \
chsh -s /usr/bin/nologin guacd
USER guacd
EXPOSE 4822
CMD /usr/bin/guacd -b 0.0.0.0 -L $GUACD_LOG_LEVEL -f
#!/bin/bash
cat >> /etc/pacman.conf <<EOF
[archlinuxcn]
Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxcn/\$arch
EOF
cat > /etc/pacman.d/mirrorlist <<EOF
# China
Server = https://mirrors.tuna.tsinghua.edu.cn/archlinux/\$repo/os/\$arch
Server = https://mirrors.ustc.edu.cn/archlinux/\$repo/os/\$arch
EOF
#!/bin/bash
cat >> /etc/sudoers << EOF
guacd ALL=(ALL) NOPASSWD:ALL
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment