Files
endurain/Dockerfile_frontend
João Vitória Silva 4868ad3233 Fixed bug on profile image update
- Fixed bug on profile image update
- Changed ownership of the directory to www-data:www-data of frontend container
2023-12-22 12:16:20 +00:00

33 lines
908 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
# Change ownership of the directory to www-data:www-data
RUN chown -R www-data:www-data /var/www/html
# 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"]