**Apache Airflow version**: latest

**What happened**:

There are more terminus task states than the ones we currently check in Docker Swarm Operator. This makes the operator run infinitely when the service goes into these states.
 
**What you expected to happen**:

The operator should terminate.

**How to reproduce it**:

Run a Airflow task via the Docker Swarm operator and return failed status code from it.


**Anything else we need to know**:

So as a fix I have added the complete list of tasks from the Docker reference (https://docs.docker.com/engine/swarm/how-swarm-mode-works/swarm-task-states/)
We would like to send this patch back upstream to Apache Airflow.

tests/providers/docker/operators/test_docker_swarm.py
)
        operator.execute(None)
        types_mock.TaskTemplate.assert_called_once_with(
            container_spec=mock_obj, restart_policy=mock_obj, resources=mock_obj
        )
        types_mock.ContainerSpec.assert_called_once_with(
            image='ubuntu:latest',
            command='env',
            user='unittest',
            tty=True,
            env={'UNIT': 'TEST', 'AIRFLOW_TMP_DIR': '/tmp/airflow'},
        )
        types_mock.RestartPolicy.assert_called_once_with(condition='none')
        types_mock.Resources.assert_called_once_with(mem_limit='128m')
        client_class_mock.assert_called_once_with(
            base_url='unix://var/run/docker.sock', tls=None, version='1.19'
        )
        client_mock.service_logs.assert_called_once_with(
            'some_id', follow=True, stdout=True, stderr=True, is_tty=True
        )
        csargs, cskwargs = client_mock.create_service.call_args_list[0]
        assert len(csargs) == 1, 'create_service called with different number of arguments than expected'
        assert csargs == (mock_obj,)
        assert cskwargs['labels'] == {'name': 'airflow__adhoc_airflow__unittest'}
        assert cskwargs['name'].startswith('airflow-')
        assert client_mock.tasks.call_count == 5
        client_mock.remove_service.assert_called_once_with('some_id')
    @mock.patch('airflow.providers.docker.operators.docker.APIClient')
    @mock.patch('airflow.providers.docker.operators.docker_swarm.types')
    def test_auto_remove(self, types_mock, client_class_mock):