Fiber bundle is compact if base and fiber are
Solution 1:
We use the following characterization of compactness: every infinite net has a convergent subnet.
Let $\{x_{\lambda}\}_{\Lambda}$ be an infinite net in $E$, $\Lambda$ the directed set of the net. As $B$ is compact, there is an infinite subnet $\Lambda_1 \subset \Lambda$ for which $\{\pi(x_{\lambda})\}_{\Lambda_1}$ converges to a point $b \in B$. Fix a local trivialization $\phi_U : \pi^{-1}(U) \rightarrow U \times F$ for $b \in U$. Pare off the net $\Lambda_1$ so that $\pi(x_{\lambda}) \in U$ for all $\lambda$.
Now let $\pi_2 : U \times F \rightarrow F$ be the continuous projection onto the second factor. So, $\{\pi_2 \circ \phi_U(x_{\lambda})\}$ is an infinite net in $F$, hence possesses yet another convergent subnet $\Lambda_2$. Then $\{\phi_U(x_{\lambda})\}_{\Lambda_2}$ is convergent in $U \times F$ by definition of the product topology, and the image of this convergent net under the homeomorphism $\phi_U^{-1}$ is convergent. Thus $\{x_{\lambda}\}_{\Lambda_2}$ is a convergent subnet.
Solution 2:
I came across (while I was actually searching for something else) another nice proof which makes use of several facts which are also useful on their own. I'm going to post it here:
Lemma 1: If $F$ is compact, then the projection $p:F\times Y\to Y$ is closed.
Proof: Let $C$ be closed and $y\notin p(C)$. Then $\{y\}\times F$ is covered my finitely many open product sets, each of which does not intersect $C$. The intersection of their projections is an open neighborhood of $y$ not intersecting $p(C)$. Thus $p(C)$ is closed.
Lemma 2: Let $\{A_i\}$ be a family of subsets of a topological space $Y$ such that $\{\mathrm{int}A_i\}$ covers $Y$. A subset $B$ is closed if $B\cap A_i$ is closed in $A_i$ for every $i$.
Proof: Let $B\subseteq Y$ such that $B\cap A_i$ is closed in $A_i$ for every $i$. Let $D=Y-B$. Since $D\cap A_i$ is open in $A_i$, thus $D\cap\mathrm{int}A_i$ is open in $Y$. Their union equals $D$, hence $B$ is closed.
Lemma 3: Let $f:X\to Y$ be a function, where $Y$ is covered as in lemma 2. Then $f$ is closed if the restrictions $f_i:f^{-1}(A_i)\to A_i$ are closed for all $i$.
Proof: Let $C$ be closed in $X$. Then $f(C)\cap A_i=f_i(C\cap f^{-1}(A_i))$ which is closed in $A_i$ by hypothesis. By lemma 2 $f(C)$ is closed.
Definition: A continuous surjection is called perfect if it is closed and the preimages of points are compact.
Definition: A continuous function is called proper if the preimages of compact sets are compact.
Lemma 4 (without proof): A perfect map is proper.
Proposition: Let $F\rightarrow E\xrightarrow{\pi}B $ be a fiber bundle with compact fiber $F$. Then $\pi$ is a proper map.
Proof: $B$ is covered by trivialized open sets $\{U_i\}$. Since $F$ is compact and $\pi_i:\pi^{-1}(U_i)\to U_i$ is equal to the projection $U_i\times F\to U_i$ up to homeomorphism, it is a closed map by Lemma 1. By lemma 3 the entire map $\pi$ is closed. Since fibers are compact, $\pi$ is also a perfect mapping, hence it is proper by Lemma 4.
Solution 3:
I decided to answer this question because it seems that there is a plethora of proofs, none of which is the one I think of first!
Note: I assume that compact means "compact and Hausdorff", which is the way I was taught at Warsaw University. This implies normality.
Claim: There is a finite cover $U_{i}$ of $B$ such that $\pi$ is trivial over some open neighbourhood $V_{i}$ of the closure of $U_{i}$, ie. $\bar{U_{i}} \subseteq V_{i}$.
Proof of the claim: By compactness it's enough to find a neigbourhood with that property of every point in $B$, so let $b \in B$. Let $V_{b}$ be an open neighbourhood of $b$. By normality, there are open sets $\{ b \} \subseteq U_{b}, (B \setminus V_{b}) \subseteq W_{b}, U_{b} \cap W_{b} = \emptyset$, because $\{ b \}, (B \setminus V_{B})$ are closed and disjoint. Now $\bar{U_{b}} \subseteq V_{b}$, since $\bar{U_{b}} \subseteq (B \setminus W_{b}) \subseteq (B \setminus (B \setminus V_{b})) \subseteq V_{b}$, so $U_{b}$ is the required neighbourhood.
This is a basic property of (locally) compact spaces which makes precise the statement that in such spaces "neighbourhoods of points can be made arbitrarily small". The theorem you're after follows easily.
Let $U_{i}$ be a cover of $B$ as above. Since $\bar{U_{i}} \subseteq V_{i}$, the subsets $\pi^{-1}(\bar{U_{i}}) \simeq \bar{U_{i}} \times F$ are compact and their union is $E$ by construction. So $E$ is the union of a finite number of compact subsets and thus is compact itself.