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

airflow/providers/docker/operators/docker.py
:param xcom_all: Push all the stdout or just the last line.
        The default is False (last line).
    :type xcom_all: bool
    :param docker_conn_id: The :ref:`Docker connection id <howto/connection:docker>`
    :type docker_conn_id: str
    :param dns: Docker custom DNS servers
    :type dns: list[str]
    :param dns_search: Docker custom DNS search domain
    :type dns_search: list[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 shm_size: Size of ``/dev/shm`` in bytes. The size must be
        greater than 0. If omitted uses system default.
    :type shm_size: int
    :param tty: Allocate pseudo-TTY to the container
        This needs to be set see logs of the Docker container.
    :type tty: bool
    :param privileged: Give extended privileges to this container.
    :type privileged: bool
    :param cap_add: Include container capabilities
    :type cap_add: list[str]
    """
    template_fields = ('command', 'environment', 'container_name')
    template_ext = (
        '.sh',
        '.bash',
    )
    def __init__(