mirror of
https://github.com/joaovitoriasilva/endurain.git
synced 2026-01-10 08:17:59 -05:00
30 lines
805 B
Plaintext
30 lines
805 B
Plaintext
# Use an official PHP runtime as a parent image
|
|
FROM php:8.3-apache
|
|
|
|
# Links Docker image with repository
|
|
LABEL org.opencontainers.image.source https://github.com/joaovitoriasilva/gearguardian
|
|
|
|
# Set the working directory to /var/www/html
|
|
WORKDIR /var/www/html
|
|
|
|
# Copy the current directory contents into the container at /var/www/html
|
|
COPY frontend/ /var/www/html
|
|
|
|
# Install any dependencies your application needs
|
|
RUN apt-get update
|
|
|
|
# Expose port 80 to the outside world
|
|
EXPOSE 80
|
|
|
|
# Define environment variables
|
|
ENV APACHE_DOCUMENT_ROOT /var/www/html
|
|
|
|
# Enable Apache modules
|
|
RUN a2enmod rewrite
|
|
|
|
# Update the default virtual host to use the environment variable
|
|
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
|
|
|
|
# Start Apache
|
|
CMD ["apache2-foreground"]
|