mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-21 22:36:39 +00:00
Don't set the hostname in the scope container when running with weavedns.
This commit is contained in:
@@ -14,11 +14,6 @@ while true; do
|
||||
DNS_SERVER="$2"
|
||||
shift 2
|
||||
;;
|
||||
--hostname)
|
||||
[ $# -gt 1 ] || usage
|
||||
HOSTNAME="$2"
|
||||
shift 2
|
||||
;;
|
||||
--searchpath)
|
||||
[ $# -gt 1 ] || usage
|
||||
SEARCHPATH="$2"
|
||||
@@ -36,9 +31,4 @@ if [ -n "$DNS_SERVER" -a -n "$SEARCHPATH" ]; then
|
||||
echo "nameserver $DNS_SERVER" >>/etc/resolv.conf
|
||||
fi
|
||||
|
||||
if [ -n "$HOSTNAME" ]; then
|
||||
echo "$HOSTNAME" >/etc/hostname
|
||||
hostname -F /etc/hostname
|
||||
fi
|
||||
|
||||
exec /sbin/runsvdir /etc/service
|
||||
|
||||
5
scope
5
scope
@@ -122,11 +122,10 @@ case "$COMMAND" in
|
||||
check_not_running $CONTAINER_NAME $IMAGE
|
||||
|
||||
# If WeaveDNS is running, we want to automatically tell the scope
|
||||
# image to use weave dns. We can't use --dns or --hostname
|
||||
# with --net=host, so we have to hack it.
|
||||
# image to use weave dns. We can't use --dns with --net=host, so we have to hack it.
|
||||
if dns_running; then
|
||||
docker_bridge_ip
|
||||
WEAVESCOPE_DNS_ARGS="--dns $DOCKER_BRIDGE_IP --hostname $HOSTNAME --searchpath $DOMAINNAME"
|
||||
WEAVESCOPE_DNS_ARGS="--dns $DOCKER_BRIDGE_IP --searchpath $DOMAINNAME"
|
||||
fi
|
||||
|
||||
CONTAINER=$(docker run --privileged -d --name=$CONTAINER_NAME --net=host \
|
||||
|
||||
Reference in New Issue
Block a user