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

From wikieduonline
Jump to navigation Jump to search
Line 4: Line 4:
 
  [[COPY]] . /usr/src/myapp
 
  [[COPY]] . /usr/src/myapp
 
  [[WORKDIR]] /usr/src/myapp
 
  [[WORKDIR]] /usr/src/myapp
  [[CMD]] [ "php", "./[[your-script.php]]" ]
+
  [[CMD]] [ "php", "./[[index.php]]" ]
  
 
  docker run php-apache
 
  docker run php-apache

Revision as of 13:14, 15 February 2024

FROM php:apache
COPY . /usr/src/myapp
WORKDIR /usr/src/myapp
CMD [ "php", "./index.php" ]
docker run php-apache
Hello World!We are learning PHP!%

Related

php:apache image

See also

Advertising: