**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
def setUp(self):
        self.tempdir_patcher = mock.patch('airflow.providers.docker.operators.docker.TemporaryDirectory')
        self.tempdir_mock = self.tempdir_patcher.start()
        self.tempdir_mock.return_value.__enter__.return_value = TEMPDIR_MOCK_RETURN_VALUE
        self.client_mock = mock.Mock(spec=APIClient)
        self.client_mock.create_container.return_value = {'Id': 'some_id'}
        self.client_mock.images.return_value = []
        self.client_mock.attach.return_value = ['container log']
        self.client_mock.logs.return_value = ['container log']
        self.client_mock.pull.return_value = {"status": "pull log"}
        self.client_mock.wait.return_value = {"StatusCode": 0}
        self.client_mock.create_host_config.return_value = mock.Mock()
        self.client_class_patcher = mock.patch(
            'airflow.providers.docker.operators.docker.APIClient',
            return_value=self.client_mock,
        )
        self.client_class_mock = self.client_class_patcher.start()
    def tearDown(self) -> None:
        self.tempdir_patcher.stop()
        self.client_class_patcher.stop()
    def test_execute(self):