The following always gives you a Galois extension with Galois group isomorphic to $D_4$ of order 8. Let $F$ be a field of characteristic not equal to 2, like $\Bbb{Q}(i)$. Choose $c \in F$ such that $c$ is not a square in $F$. Then $L = F(\sqrt{c})$ is a degree 2 extension of $F$.
Now adjoin an element $\sqrt{a + b\sqrt{c}}$ to $L$ in such a way that $a + b\sqrt{c}$ is not a square in $L$. Then if you chose $a,b,c$ carefully in such a way that $a^2 - b^2c \neq g^2c$ and is also not equal to $h^2$ for any $g,h \in F$ then $E = F(\sqrt{c},\sqrt{a + b\sqrt{c}})$ will not be a Galois extension of $F$. However if you then consider $M = E(\sqrt{a - b\sqrt{c}})$ then this will be a Galois extension of $F$, because the polynomial $(x^2 -a)^2 - b^2c$ splits completely in here. Furthermore using the degree arguments above this polynomial is irreducible over $F$ and you can check that its derivative is non-zero so that $M$ is a normal and separable extension of $F$.
By a simple computation one can check that $M$ is a degree 8 extension of $F$ with Galois group isomorphic to $D_4$.
Now let's choose a specific example where this works. Let $F = \Bbb{Q}(i)$. Choose $c = 2, a= 2$ and $ b= 3$. Clearly $\sqrt{2} \notin \Bbb{Q}(i)$. Now we then calculate $a^2 - b^2c = 4 - 9\cdot2 = -14$. This is clearly not the square of anything in $\Bbb{Q}(i)$ and furthermore if we attempt to write $-14 = g^2\cdot 2$ we will get a square root of 7 in $\Bbb{Q}(i)$ which is impossible too. It follows by what I said above that
$E= F(\sqrt{2},\sqrt{2 + 3\sqrt{2}})$ is not Galois extension, but that $M= E(\sqrt{2 - 3\sqrt{2}})$ is a Galois extension of $F$ with Galois group isomorphic to $D_4$. To find an irreducible polynomial of degree $8$ over $\Bbb{Q}(i)$, I suggest you consider the minimal polynomial of $\sqrt{2 + 3\sqrt{2}} + \sqrt{2 - 3\sqrt{2}} + \sqrt{2}$ over $\Bbb{Q}(i)$. You can show it is irreducible by showing that $\Bbb{Q}(i)\bigg(\sqrt{2 + 3\sqrt{2}} + \sqrt{2 - 3\sqrt{2}} + \sqrt{2}\bigg) = \Bbb{Q}(i)\bigg(\sqrt{2+3\sqrt{2}},\sqrt{2 - 3\sqrt{2}},\sqrt{2}\bigg).$
Now one containment is already obvious. To show the other write $x = \sqrt{2 + 3\sqrt{2}} + \sqrt{2 - 3\sqrt{2}} + \sqrt{2}$. Then you find that $x^2 -2\sqrt{2}x = 2 \sqrt{-14}$ and so
$\sqrt{2} = \frac{x^2 - 2\sqrt{-14}}{2x} \in \Bbb{Q}(i)\bigg(\sqrt{2 + 3\sqrt{2}} + \sqrt{2 - 3\sqrt{2}} + \sqrt{2}\bigg).$
It follows that $y =\sqrt{2 + 3\sqrt{2}} + \sqrt{2 - 3\sqrt{2}}$ is in here too. By a similar computation as above you find that $\sqrt{2 + 3\sqrt{2}}$ is in here and consequently $\sqrt{2 - 3\sqrt{2}}$ finishing the proof. Hence whatever monic polynomial polynomial of degree 8 in $\Bbb{Q}(i)[x]$ that we find with $x$ as a root, that is the minimal polynomial of $x$ over $\Bbb{Q}(i)$.
Now from the step above where $ x^2 -2\sqrt{2}x = 2 \sqrt{-14}$, you find that $x^4 = -56 + 8x + 8\sqrt{-28x}$. Rearranging we get
$x^4 - 8x + 56 = \sqrt{-28}x$
from which it follows that $f(y) = (y^4 - 8y + 56)^2 +28y^2 \in \Bbb{Q}(i)[y]$ is the minimal polynomial for $x$ over $\Bbb{Q}(i)$.