As in the previous proof of $f$ being constant on $\mathbb{R}$, define $g(x) = f(x-1)$, so that $g(x) = g(2x)$; the domains of $f$ and $g$ are just shifted versions of each other.
Certainly, if the domain of $g$ is small enough, say $[2,3]$, then $g$ can be any continuous function, because the domain contains no $x$ and $2x$ at the same time. A more interesting question is: how large can we make the domain so that $g$ will still not be constant? The answer to this is suggested by JDH's answer: if we remove only the single point 0, making the domain $\mathbb{R} \setminus \\{0\\}$, it is disconnected into two components which can independently have constant values.
How big can a domain be on which $g$ is not even locally constant? Remove an arbitrarily small interval around $0$. Take any non-constant continuous function $h$ which is periodic with unit period, and let $g(x) = h(\log_2 x)$. Then $g(x) = g(2x)$ for all $x$, and is continuous everywhere.