What will happen if I build an image contain programs need reboot to take effect?

I have yet been able to find any info through search, if there already are existing topic, would you please kindly point me there and close my post.

I notice many people will do:
RUN sudo apt-get update && sudo apt-get upgrade
when building containers, I noticed reboot request will usually be suppressed, won’t there be side effects?