**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.

airflow/providers/docker/operators/docker_swarm.py
The path to the mounted directory can be accessed
    via the environment variable ``AIRFLOW_TMP_DIR``.
    If a login to a private registry is required prior to pulling the image, a
    Docker connection needs to be configured in Airflow and the connection ID
    be provided with the parameter ``docker_conn_id``.
    :param image: Docker image from which to create the container.
        If image tag is omitted, "latest" will be used.
    :type image: str
    :param api_version: Remote API version. Set to ``auto`` to automatically
        detect the server's version.
    :type api_version: str
    :param auto_remove: Auto-removal of the container on daemon side when the
        container's process exits.
        The default is False.
    :type auto_remove: bool
    :param command: Command to be run in the container. (templated)
    :type command: str or list
    :param docker_url: URL of the host running the docker daemon.
        Default is unix://var/run/docker.sock
    :type docker_url: str
    :param environment: Environment variables to set in the container. (templated)
    :type environment: dict
    :param force_pull: Pull the docker image on every run. Default is False.
    :type force_pull: bool
    :param mem_limit: Maximum amount of memory the container can use.
        Either a float value, which represents the limit in bytes,
        or a string like ``128m`` or ``1g``.
    :type mem_limit: float or str
    :param tls_ca_cert: Path to a PEM-encoded certificate authority
        to secure the docker connection.