Nope. Not at all. Inside and outside his tub. Next to my other pets or not. Same goes for my food frenzy king, Children's python and woma. My CP sometimes strikes the glass when I approached him and he gets way too excited thinking food is coming. But my cats sometimes would sleep on top of his tank (mesh lid) and he would not react with any strikes, just hanging out and waiting for food.
The boa could be striking out of fear, out of excitement thinking food is coming (not because the dog is the food item), etc.