Is there a ring R for which R[x] contains only finitely many irreducible monic polynomials?

I am looking for an example (if any) of a ring $R$ for which $R[x]$ contains only finitely many irreducible monic polynomials.

I know that Euclid proof on infinitely many prime numbers works also for $K[x]$ where $K$ is a field (for example here: Ring of polynomials over a field has infinitely many primes) but I don't see why this proof does not work for arbitrary ring $R$.

As someone noted, $R$ must be finite because polynomials $x-r$ are irreducible for every $r \in R.$

• Welcome to MSE. Please use MathJax. – José Carlos Santos Feb 17 '18 at 10:11
• The argument there works whenever $R$ is a UFD. A counter-example should require $R$ to be finite. – Watson Feb 17 '18 at 10:12
• But how do you use UFD property? – Josef Svoboda Feb 17 '18 at 10:13