Browse Source

Install wget in Cloud Docker images (#80870)

Cloud needs wget to be available in 8.x, so add it to their Docker images.
Rory Hunter 3 years ago
parent
commit
4cb6fb925e

+ 1 - 1
distribution/docker/src/docker/Dockerfile

@@ -163,7 +163,7 @@ RUN <%= retry.loop(
       "export DEBIAN_FRONTEND=noninteractive && \n" +
       "${package_manager} update && \n" +
       "${package_manager} upgrade -y && \n" +
-      "${package_manager} install -y --no-install-recommends curl netcat zip unzip vim-tiny && \n" +
+      "${package_manager} install -y --no-install-recommends curl netcat zip unzip vim-tiny ${docker_base == 'cloud' ? 'wget' : '' } && \n" +
       "${package_manager} clean && \n" +
       "rm -rf /var/lib/apt/lists/*"
   ) %>

+ 9 - 0
qa/os/src/test/java/org/elasticsearch/packaging/util/docker/Docker.java

@@ -480,6 +480,15 @@ public class Docker {
         } else {
             assertThat("Cloud image should not have any plugins in " + pluginArchive, plugins, empty());
         }
+
+        // Cloud uses `wget` to install plugins / bundles.
+        Stream.of("wget")
+            .forEach(
+                cliBinary -> assertTrue(
+                    cliBinary + " ought to be available.",
+                    dockerShell.runIgnoreExitCode("bash -c  'hash " + cliBinary + "'").isSuccess()
+                )
+            );
     }
 
     public static void waitForElasticsearch(Installation installation) throws Exception {