Set it in Apache config file with a sed replace. Like this:
RUN sed -i 's/#LoadModule mod_headers/LoadModule mod_headers/g'
/usr/local/apache2/conf/httpd.conf
You would obviously change the module name with the required module of yours... And the correct location of your httpd.conf as it might be in a different path.