Commit 08b90e6e authored by Victor Nikulshin's avatar Victor Nikulshin

Embed Apache VirtualHost config into Dockerfile

parent c86366ee
......@@ -35,9 +35,19 @@ RUN chmod 600 /root/.ssh/id_rsa*
RUN exec ssh-agent /bin/bash && ssh-add /root/.ssh/id_rsa
RUN ssh-keyscan gitlab.savoirfairelinux.com >> /root/.ssh/known_hosts
#Copy vhost configuration and enable modules
RUN cp /opt/sfl/conf/vhost.conf /etc/apache2/sites-available/000-default.conf
RUN a2enmod rewrite vhost_alias
# Create Apache configuration
RUN echo 'ServerName localhost\n\
<VirtualHost *:80>\n\
DocumentRoot /opt/sfl/src/drupal\n\
\n\
<Directory /opt/sfl/src/drupal/>\n\
AllowOverride All\n\
Options FollowSymLinks\n\
Require all granted\n\
</Directory>\n\
</VirtualHost>'\
> /etc/apache2/sites-available/000-default.conf
RUN a2enmod rewrite vhost_alias && service apache2 restart
ENTRYPOINT ["/opt/init/init.sh"]
CMD ["/sbin/my_init"]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment