import re


def _validate_docker_container_id(container_id):
    """Validates a docker container id.

    Arguments:
      container_id: A string or buffer with the container id.

    Returns:
      True if the container id is valid, False otherwise.

    """

    # Check if container id is valid
    valid_id_p = '^[0-9a-f]+$'

    match = re.match(valid_id_p, container_id)
    if match and len(container_id) == 64:
        return True

    # Container id is not valid
    return False