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

From wikieduonline
Jump to navigation Jump to search
Line 5: Line 5:
 
  [[COPY]] . /usr/src/myapp
 
  [[COPY]] . /usr/src/myapp
 
  [[WORKDIR]] /usr/src/myapp
 
  [[WORKDIR]] /usr/src/myapp
 +
[[EXPOSE 80]]
 
  [[CMD]] [ "php", "./[[index.php]]" ]
 
  [[CMD]] [ "php", "./[[index.php]]" ]
  

Revision as of 13:20, 15 February 2024

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

Related

php:apache image

See also

Advertising: