Raise DockerException instead of TypeError