Difference between revisions of "Php:apache"

From wikieduonline
Jump to navigation Jump to search
Line 6: Line 6:
  
 
  [[docker build . -t php-apache]]
 
  [[docker build . -t php-apache]]
 +
 +
 +
 +
FROM php:7.4-apache
 +
 +
# Copy your PHP files to the document root
 +
COPY . /var/www/html
 +
 +
# Expose the web server port
 +
[[EXPOSE]] 80
 +
 +
# Start the Apache web server
 +
CMD ["apache2", "-D", "FOREGROUND"]
  
  

Revision as of 20:53, 6 February 2024


docker pull php:apache


docker build . -t php-apache


FROM php:7.4-apache

# Copy your PHP files to the document root
COPY . /var/www/html 

# Expose the web server port
EXPOSE 80 

# Start the Apache web server
CMD ["apache2", "-D", "FOREGROUND"]


See also

Advertising: