Files
whp-default-container/Dockerfile

21 lines
712 B
Docker
Raw Normal View History

FROM httpd:alpine
# Enable .htaccess files by modifying Apache configuration
RUN sed -i '/<Directory "\/usr\/local\/apache2\/htdocs">/,/<\/Directory>/ s/AllowOverride None/AllowOverride All/' /usr/local/apache2/conf/httpd.conf
# Enable mod_rewrite module (commonly used in .htaccess)
RUN sed -i 's/#LoadModule rewrite_module/LoadModule rewrite_module/' /usr/local/apache2/conf/httpd.conf
# Copy the default landing page to the container
COPY index.html /index.html
2025-07-12 21:44:24 -07:00
RUN rm -f /usr/local/apache2/htdocs/index.html
# Copy the startup script
COPY scripts/startup.sh /startup.sh
# Make the startup script executable
RUN chmod +x /startup.sh
# Set the startup script as the entrypoint
ENTRYPOINT ["/startup.sh"]