Difference between revisions of "Docker build . -t php-apache"

From wikieduonline
Jump to navigation Jump to search
Line 8: Line 8:
 
  [[EXPOSE 80]]
 
  [[EXPOSE 80]]
  
  docker run php-apache
+
  docker run php-apache -n php-apache-app
 
  Hello World!We are learning PHP!%
 
  Hello World!We are learning PHP!%
  

Revision as of 13:29, 15 February 2024

docker build . -t php-apache-app
FROM php:apache
COPY . /var/www/html
WORKDIR /var/www/html
CMD [ "php", "./index.php" ]
EXPOSE 80
docker run php-apache -n php-apache-app
Hello World!We are learning PHP!%

Related

php:apache image
docker run -d php-apache-app

See also

Advertising: