**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
cpu_shares=1024,
                    mem_limit=None,
                    auto_remove=False,
                    dns=None,
                    dns_search=None,
                    cap_add=None,
                    extra_hosts=None,
                    privileged=False,
                ),
            ]
        )
        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):
        operator = DockerOperator(
            private_environment={'PRIVATE': 'MESSAGE'}, image='ubuntu:latest', task_id='unittest'
        )
        assert operator._private_environment == {
            'PRIVATE': 'MESSAGE'
        }, "To keep this private, it must be an underscored attribute."
    @mock.patch('airflow.providers.docker.operators.docker.tls.TLSConfig')
    def test_execute_tls(self, tls_class_mock):