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

Don't set the hostname in the scope container when running with weavedns #97

Merged
merged 1 commit into from
May 24, 2015
Merged
Show file tree
Hide file tree
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
10 changes: 0 additions & 10 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 changes: 2 additions & 3 deletions scope
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down