Racism, is a learned activity, that is to say, people aren't born hating one race, they are taught, sometimes subtlety, sometimes deliberately, typically by either parents or peers, to hate or to despise another person solely based on their complexion. This means that racism is most definitely a learned activity, it isn't natural, nor is it logical, as a given skin color, carries no connotation of a person's character or a person's intelligence, because character is part and parcel of the actual psychological makeup of a given person, and intelligence is of the mind, and neither are of the skin.
In general, dogs are quite accommodating, that is to say, that if you treat your dog well, by providing it with focused attention, walks and exercise, food and water, your dog will definitely appreciate your value and will show you the loyalty and affection that good dogs are noted for. However, not everybody wants their dog to be socially well adjusted, for instance, those that train dogs to fight, do not treat their dogs in a manner that would make them a good pet, instead, they are deprived of the very things that would make them well adjusted, and instead are trained to be hyper aggressive, in a true dog-eat-dog manner.
A normal dog's instinct is to be a good companion to his family, however, dogs that are either ignored, mistreated, caged, or on a perpetual short leash in a very confined area, are not typically going to socialize well with other people or other dogs, because of these conditions. So that, for instance, when being walked outside for some much needed exercise, these dogs will typically show strong aggressive tendencies.
While it is true, that you can teach a given dog to behave in a manner that appears to be racist, one must also recognize that dogs are trainable to all sorts of things, sensible or not, meaning that dogs are intrinsically not racist or bigoted, so properly a dog that exhibits negative behavior towards certain physical characteristics of people, has been either deliberately trained to be that way or has been provided with consistent behavioral clues by their owner, that people with certain physical characteristics, make their owner uncomfortable, so in defense of that owner, the dog exhibits and mirrors that negative behavior.
In point of fact, all things being equal, dogs do not care a thing about what their owner looks like, how tall or short they are, hot fat or skinny they are, the job that they have or don't have, the car that they drive, the neighborhood that they live in, or any other social status marker, that humans typically care greatly about. The only real thing that dogs care about is that they are a valid member of what they consider to be the "dog pack" and you as the owner are its loyal leader of such.
Dogs learn what is acceptable or unacceptable by observation, consistent correction, and training, and since they obviously aren't human, that means that they aren't and never will have the capacity to be racist which is a very good thing, to which dogs instinctively know that the color of one's coat has no innate social status.