Looks like a timeout error that occurs sporadically (https://gradle-enterprise.elastic.co/scans/tests?search.relativeStartTime=P90D&search.timeZoneId=Europe/Zurich&tests.container=org.elasticsearch.packaging.test.DockerTests&tests.test=test071BindMountCustomPathWithDifferentUID)

**Build scan:**
https://gradle-enterprise.elastic.co/s/jbwalyqbqnzry/tests/:qa:os:destructiveDistroTest.default-docker/org.elasticsearch.packaging.test.DockerTests/test071BindMountCustomPathWithDifferentUID

**Reproduction line:**
`null`

**Applicable branches:**
master

**Reproduces locally?:**
No

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.packaging.test.DockerTests&tests.test=test071BindMountCustomPathWithDifferentUID

**Failure excerpt:**
```
org.elasticsearch.packaging.util.Shell$ShellException: Command was not successful: [bash -c docker run --rm --volume "/tmp/DockerTests13344726983695476209:/mount/tmp/DockerTests13344726983695476209" alpine:3.13 /bin/sh -c "mkdir /mount/tmp/DockerTests13344726983695476209/esDataDir && chown 1500:0 /mount/tmp/DockerTests13344726983695476209/esDataDir && chmod 0770 /mount/tmp/DockerTests13344726983695476209/esDataDir"]
   result: exitCode = [125] stdout = [] stderr = [Unable to find image 'alpine:3.13' locally
docker: Error response from daemon: Get "https://registry-1.docker.io/v2/": net/http: request canceled (Client.Timeout exceeded while awaiting headers).
See 'docker run --help'.]

  at __randomizedtesting.SeedInfo.seed([D7A7CCFA9B5049AB:9AEB833D01EECE93]:0)
  at org.elasticsearch.packaging.util.Shell.runScript(Shell.java:143)
  at org.elasticsearch.packaging.util.Shell.run(Shell.java:73)
  at org.elasticsearch.packaging.util.docker.Docker.executePrivilegeEscalatedShellCmd(Docker.java:368)
  at org.elasticsearch.packaging.util.docker.Docker.mkDirWithPrivilegeEscalation(Docker.java:388)
  at org.elasticsearch.packaging.test.DockerTests.lambda$test071BindMountCustomPathWithDifferentUID$2(DockerTests.java:477)
  at org.elasticsearch.packaging.util.Platforms.onLinux(Platforms.java:63)
  at org.elasticsearch.packaging.test.DockerTests.test071BindMountCustomPathWithDifferentUID(DockerTests.java:474)
  at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
  at java.lang.reflect.Method.invoke(Method.java:577)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1758)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:946)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:982)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:996)
  at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
  at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.lambda$forkTimeoutingTask$0(ThreadLeakControl.java:850)
  at java.lang.Thread.run(Thread.java:833)

```
qa/os/src/test/java/org/elasticsearch/packaging/util/docker/Docker.java
%s
                Stderr:
                %s\
                """.formatted(dockerLogs.stdout(), dockerLogs.stderr()));
        }
    }
    /**
     * Removes the container with a given id
     */
    public static void removeContainer(String containerId) {
        if (containerId != null) {
            
            logger.debug("Removing container " + containerId);
            final String command = "docker rm -f " + containerId;
            final Shell.Result result = sh.runIgnoreExitCode(command);
            if (result.isSuccess() == false) {
                boolean isErrorAcceptable = result.stderr().contains("removal of container " + containerId + " is already in progress")
                    || result.stderr().contains("Error: No such container: " + containerId);
                
                if (isErrorAcceptable == false) {
                    throw new RuntimeException("Command was not successful: [" + command + "] result: " + result);
                }
            }
        }
    }
    /**
     * Removes the currently running container.
     */
    public static void removeContainer() {
        try {