Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IP addresses can be input as variables #519

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,10 @@ ARG PREFIX_DIR=/opt/guacamole
ENV LC_ALL=C.UTF-8
ENV LD_LIBRARY_PATH=${PREFIX_DIR}/lib
ENV GUACD_LOG_LEVEL=info
# IPv4 is used by default, which is set to 127.0.0.1. If IPv6 is used, set it to ::1
ENV LOCAL_HOST=127.0.0.1
# By default, IPv4 is set to 0.0.0.0. If IPv6 is used, set to ::
ENV ANY_IP_ADDRESS=0.0.0.0

# Copy build artifacts into this stage
COPY --from=builder ${PREFIX_DIR} ${PREFIX_DIR}
Expand All @@ -182,7 +186,7 @@ RUN apk add --no-cache \
xargs apk add --no-cache < ${PREFIX_DIR}/DEPENDENCIES

# Checks the operating status every 5 minutes with a timeout of 5 seconds
HEALTHCHECK --interval=5m --timeout=5s CMD nc -z 127.0.0.1 4822 || exit 1
HEALTHCHECK --interval=5m --timeout=5s CMD nc -z ${LOCAL_HOST} 4822 || exit 1

# Create a new user guacd
ARG UID=1000
Expand All @@ -201,5 +205,5 @@ EXPOSE 4822
# Note the path here MUST correspond to the value specified in the
# PREFIX_DIR build argument.
#
CMD /opt/guacamole/sbin/guacd -b 0.0.0.0 -L $GUACD_LOG_LEVEL -f
CMD /opt/guacamole/sbin/guacd -b ${ANY_IP_ADDRESS} -L $GUACD_LOG_LEVEL -f