Просмотр исходного кода

Add auto update to support.sh

Before running the support script
try to fetch the latest version

Signed-off-by: Flavio Crisciani <flavio.crisciani@docker.com>
Flavio Crisciani 7 лет назад
Родитель
Сommit
5de876c7ae
2 измененных файлов с 20 добавлено и 36 удалено
  1. 6 36
      libnetwork/support/Dockerfile
  2. 14 0
      libnetwork/support/run.sh

+ 6 - 36
libnetwork/support/Dockerfile

@@ -2,48 +2,18 @@ FROM docker:18-dind
 
 RUN set -ex \
     && echo "http://nl.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories \
-    && echo "http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
-    && apk update \
-    && apk add --no-cache \
-    tcpdump \
-    bridge-utils \
-    netcat-openbsd \
+    && echo "http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
+RUN apk add --no-cache \
     util-linux \
+    bridge-utils \
     iptables \
     iputils \
     iproute2 \
-    iftop \
-    drill \
-    apache2-utils \
-    strace \
-    curl \
-    ethtool \
     ipvsadm \
-    ngrep \
-    iperf \
-    nmap \
-    nmap-nping \
     conntrack-tools \
-    socat \
-    busybox-extras \
-    tcptraceroute \
-    mtr \
-    fping \
-    liboping \
-    iptraf-ng \
-    dhcping \
-    nmap-nping \
-    net-snmp-tools \
-    python2 \
-    py2-virtualenv \
-    py-crypto \
-    scapy \
-    vim \
-    bird \
-    bash \
-    bind-tools
+    bash
 
 WORKDIR /bin
-COPY support.sh .
+COPY *.sh /bin/
 
-CMD /bin/support.sh
+CMD /bin/run.sh

+ 14 - 0
libnetwork/support/run.sh

@@ -0,0 +1,14 @@
+#!/bin/sh
+
+# try to fetch the latest version from github
+wget -O support.sh.new https://raw.githubusercontent.com/docker/libnetwork/master/support/support.sh
+
+if [ "$?" -eq "0" ]; then
+  mv support.sh.new support.sh
+  chmod +x support.sh
+else
+  echo "issue fetching the latest support.sh, will use the container version"
+fi
+
+echo "run the support script"
+./support.sh