**Apache Airflow version**: 2.0.0

**Kubernetes version (if you are using kubernetes)** (use `kubectl version`): NA

**Environment**: 
* local Ubuntu 18.04 LTS / 
* docker-compose version 1.25.3, build d4d1b42b
* docker  20.10.1, build 831ebea

**What happened**:

when enabling xcom push for a docker operator the following error is thrown after the task finishes succesfully:
`TypeError: Object of type bytes is not JSON serializable`


**What you expected to happen**:

* error is not thrown
* if xcom_all is True: xcom contains all log lines
* if xcom_all is False: xcom contains last log line


**How to reproduce it**:

see docker compose and readme here:
https://github.com/AlessioM/airflow-xcom-issue

tests/providers/docker/operators/test_docker.py
self.client_mock.attach.return_value = ['unicode container log 😁']
        originalRaiseExceptions = logging.raiseExceptions
        logging.raiseExceptions = True
        operator = DockerOperator(image='ubuntu', owner='unittest', task_id='unittest')
        with mock.patch('traceback.print_exception') as print_exception_mock:
            operator.execute(None)
            logging.raiseExceptions = originalRaiseExceptions
            print_exception_mock.assert_not_called()
    def test_execute_container_fails(self):
        self.client_mock.wait.return_value = {"StatusCode": 1}
        operator = DockerOperator(image='ubuntu', owner='unittest', task_id='unittest')
        with pytest.raises(AirflowException):
            operator.execute(None)
    def test_auto_remove_container_fails(self):
        self.client_mock.wait.return_value = {"StatusCode": 1}
        operator = DockerOperator(image='ubuntu', owner='unittest', task_id='unittest', auto_remove=True)
        operator.container = {'Id': 'some_id'}
        with pytest.raises(AirflowException):
            operator.execute(None)
        self.client_mock.remove_container.assert_called_once_with('some_id')
    @staticmethod
    def test_on_kill():
        client_mock = mock.Mock(spec=APIClient)
        operator = DockerOperator(image='ubuntu', owner='unittest', task_id='unittest')
        operator.cli = client_mock
        operator.container = {'Id': 'some_id'}
        operator.on_kill()
        client_mock.stop.assert_called_once_with('some_id')
    def test_execute_no_docker_conn_id_no_hook(self):