From b49ea5ba02799d1304c0e493081f1e042c10f668 Mon Sep 17 00:00:00 2001
From: Jonny Lai <jonny.lai@commandp.com>
Date: Wed, 7 Sep 2016 18:32:23 +0800
Subject: [PATCH] Fix missing path of fping and fping6

Error message:

  At least one of '/usr/bin/fping', '/usr/bin/fping6' must exist.
  Both are missing in the system.
---
 proxy-mysql/alpine/Dockerfile   | 5 ++++-
 proxy-sqlite3/alpine/Dockerfile | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/proxy-mysql/alpine/Dockerfile b/proxy-mysql/alpine/Dockerfile
index ff8ea7433..46e2de4db 100644
--- a/proxy-mysql/alpine/Dockerfile
+++ b/proxy-mysql/alpine/Dockerfile
@@ -96,7 +96,10 @@ RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \
     rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
     apk del ${APK_FLAGS_COMMON} --purge \
             build-dependencies && \
-    rm -rf /var/cache/apk/*
+    rm -rf /var/cache/apk/* && \
+    # Fix missing path of fping and fping6.
+    ln -s /usr/sbin/fping /usr/bin/ && \
+    ln -s /usr/sbin/fping6 /usr/bin/
 
 EXPOSE 10051/TCP 162/UDP
 
diff --git a/proxy-sqlite3/alpine/Dockerfile b/proxy-sqlite3/alpine/Dockerfile
index 2df31dd5c..bfc797e19 100644
--- a/proxy-sqlite3/alpine/Dockerfile
+++ b/proxy-sqlite3/alpine/Dockerfile
@@ -91,7 +91,10 @@ RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \
     rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
     apk del ${APK_FLAGS_COMMON} --purge \
             build-dependencies && \
-    rm -rf /var/cache/apk/*
+    rm -rf /var/cache/apk/* && \
+    # Fix missing path of fping and fping6.
+    ln -s /usr/sbin/fping /usr/bin/ && \
+    ln -s /usr/sbin/fping6 /usr/bin/
 
 EXPOSE 10051/TCP 162/UDP