Repository: beeware/briefcase

Issue:
Docker version parsing fails on OpenSUSE Tumbleweed
### Describe the bug

On OpenSUSE Tumbleweed, the docker version is returned as `Docker version 26.1.0-ce, build c8af8ebe4a89`. The expected format does not include `-ce`.

```
❯ briefcase run --target ubuntu -vv

>>> Running Command:
>>>     docker --version
>>> Working Directory:
>>>     /home/user/github/beeware/briefcase/tmp/helloworld
>>> Environment Overrides:
>>>     DOCKER_CLI_HINTS=false
>>> Command Output:
>>>     Docker version 26.1.0-ce, build c8af8ebe4a89
>>> Return code: 0

*************************************************************************
** WARNING: Unable to determine the version of Docker                  **
*************************************************************************
```

### Steps to reproduce

Run `briefcase build --target ubuntu` on OpenSUSE.

### Expected behavior

Docker version parsing supports this variation of the version.

The specific issue is `packaging.version.Version` failing to parse `26.1.1-ce`.
```pycon
>>> from packaging.version import InvalidVersion, Version
>>> Version("26.1.1-ce")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/user/.pyenv/versions/briefcase-3.11/lib/python3.11/site-packages/packaging/version.py", line 200, in __init__
    raise InvalidVersion(f"Invalid version: '{version}'")
packaging.version.InvalidVersion: Invalid version: '26.1.1-ce
```

### Screenshots

_No response_

### Environment

- Operating System: Tumbleweed 20240502
- Python version: 3.11.9
- Software versions:
  - Briefcase: `0.3.18.dev283+ga10e3792`

### Logs

[briefcase.2024_05_04-11_47_44.build.log](https://github.com/beeware/briefcase/files/15210204/briefcase.2024_05_04-11_47_44.build.log)


### Additional context

_No response_


Discussion:

Patch:
diff --git a/changes/1773.bugfix.rst b/changes/1773.bugfix.rst
new file mode 100644
index 000000000..0a2741aba
--- /dev/null
+++ b/changes/1773.bugfix.rst
@@ -0,0 +1,1 @@
+The Docker version on OpenSUSE Tumbleweed is now accepted and no longer triggers a warning message.
diff --git a/src/briefcase/integrations/docker.py b/src/briefcase/integrations/docker.py
index e7660aaf1..50127c8ae 100644
--- a/src/briefcase/integrations/docker.py
+++ b/src/briefcase/integrations/docker.py
@@ -173,6 +173,7 @@ def _version_compat(cls, tools: ToolCache):
                 )
                 .split("Docker version ")[1]
                 .split(",")[0]
+                .split("-")[0]
             )
 
             # Ensure Docker version is compatible


Test patch:
diff --git a/tests/integrations/docker/test_Docker__verify.py b/tests/integrations/docker/test_Docker__verify.py
index ad65382a3..6aa8c4aae 100644
--- a/tests/integrations/docker/test_Docker__verify.py
+++ b/tests/integrations/docker/test_Docker__verify.py
@@ -65,11 +65,21 @@ def test_docker_install_url(host_os):
     assert host_os in Docker.DOCKER_INSTALL_URL
 
 
-def test_docker_exists(mock_tools, user_mapping_run_calls, capsys):
+@pytest.mark.parametrize(
+    "version_output",
+    [
+        VALID_DOCKER_VERSION,
+        # Docker version format on Ubuntu
+        "Docker version 26.1.1, build 4cf5afa",
+        # Docker version format on OpenSUSE Tumbleweed
+        "Docker version 26.1.0-ce, build c8af8ebe4a89",
+    ],
+)
+def test_docker_exists(mock_tools, user_mapping_run_calls, version_output, capsys):
     """If docker exists, the Docker wrapper is returned."""
     # Mock the return value of Docker Version
     mock_tools.subprocess.check_output.side_effect = [
-        VALID_DOCKER_VERSION,
+        version_output,
         VALID_DOCKER_INFO,
         VALID_BUILDX_VERSION,
         VALID_USER_MAPPING_IMAGE_CACHE,