Revert "Making docker.host.internal resolvable in Docker for Linux"

This reverts commit ea8cb7565ee8a74db3dfff950a8369d790d48101.

Change-Id: I0bc557c4d8da62ac3fd552056e1a335d25104835
(cherry picked from commit bae733a4fe3e8bf92ae7f2e4a47072e3552c9401)
diff --git a/Dockerfile b/Dockerfile
index 6a93503..92fc209 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -15,9 +15,7 @@
     bzip2 \
     build-essential \
     curl \
-    unzip \
-    iproute2
-
+    unzip
 RUN apt-get update && apt-get install -y ${BUILD_DEPS}
 
 # Install Bazel
@@ -67,13 +65,6 @@
 COPY --from=builder /output/ /root/onos/
 WORKDIR /root/onos
 
-# Add ip command
-COPY --from=builder /bin/ip /bin/
-COPY --from=builder /lib/x86_64-linux-gnu/libmnl.so* /lib/x86_64-linux-gnu/
-COPY --from=builder /usr/lib/x86_64-linux-gnu/libelf.so* /lib/x86_64-linux-gnu/
-COPY --from=builder /sbin/ip /sbin/
-RUN ldconfig
-
 # Set JAVA_HOME (by default not exported by zulu images)
 ARG JDK_VER
 ENV JAVA_HOME /usr/lib/jvm/zulu-${JDK_VER}-amd64
diff --git a/tools/package/bin/onos-service b/tools/package/bin/onos-service
index fe4e248..d2879ef 100755
--- a/tools/package/bin/onos-service
+++ b/tools/package/bin/onos-service
@@ -15,18 +15,6 @@
 set -e  # exit on error
 set -u  # exit on undefined variable
 
-#
-# Hack: Making docker.host.internal resolvable in Docker for Linux
-# TODO(bocon): this can be removed when this issue is resolved: https://github.com/docker/for-linux/issues/264
-#              iproute2 can also be removed from the Dockerfile as a build dep
-#
-# Only run this if we are running in a Docker container
-if awk -F/ '$2 == "docker"' /proc/self/cgroup &>/dev/null; then
-  # Add host.docker.internal to /etc/hosts if it does not resolve
-  getent hosts host.docker.internal > /dev/null || \
-  ip -4 route list match 0/0 | awk '{print $3"\thost.docker.internal"}' >> /etc/hosts
-fi
-
 # If ONOS_HOME is set, respect its value.
 # If ONOS_HOME is not set (e.g. in the init or service environment),
 # set it based on this script's path.