def METHOD_NAME(mock_popen):
    image_name = 'abcde'
    mock_proc = MagicMock()
    attrs = {"communicate.return_value": ("output", "error")}
    mock_proc.configure_mock(**attrs)
    mock_popen.return_value = mock_proc
    expected_call = ["docker", "images", "--format", '{{.ID}}', image_name]
    sonic_installer.get_container_image_id_all(image_name)
    mock_popen.assert_called_with(expected_call, stdout=subprocess.PIPE, text=True)