When setting DockerOperator with auto_remove=True in airflow version 2.0.0 the container remain in the container list if it was finished with 'Exited (1)'
tests/providers/docker/operators/test_docker.py
environment={'AIRFLOW_TMP_DIR': '/tmp/airflow', 'UNIT': 'TEST', 'PRIVATE': 'MESSAGE'},
            host_config=self.client_mock.create_host_config.return_value,
            image='ubuntu:latest',
            user=None,
            working_dir='/container/path',
            tty=True,
        )
        self.client_mock.create_host_config.assert_called_once_with(
            binds=['/host/path:/container/path', '/mkdtemp:/tmp/airflow'],
            network_mode='bridge',
            shm_size=1000,
            cpu_shares=1024,
            mem_limit=None,
            auto_remove=False,
            dns=None,
            dns_search=None,
            cap_add=None,
            extra_hosts=None,
        )
        self.tempdir_mock.assert_called_once_with(dir='/host/airflow', prefix='airflowtmp')
        self.client_mock.images.assert_called_once_with(name='ubuntu:latest')
        self.client_mock.attach.assert_called_once_with(
            container='some_id', stdout=True, stderr=True, stream=True
        )
        self.client_mock.pull.assert_called_once_with('ubuntu:latest', stream=True, decode=True)
        self.client_mock.wait.assert_called_once_with('some_id')
        assert (
            operator.cli.pull('ubuntu:latest', stream=True, decode=True) == self.client_mock.pull.return_value
        )
    def test_private_environment_is_private(self):