Files
endurain/Dockerfile_frontend
2023-12-01 23:02:18 +00:00

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"]