Difference between revisions of "Docker build . -t php-apache"
Jump to navigation
Jump to search
(5 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
[[docker build . -t]] php-apache-app | [[docker build . -t]] php-apache-app | ||
[[FROM]] [[php:apache]] | [[FROM]] [[php:apache]] | ||
− | [[COPY]] . / | + | [[COPY]] . /var/www/html |
− | [[WORKDIR]] / | + | [[WORKDIR]] /var/www/html |
+ | [[CMD]] [ "php", "./[[index.php]]" ] | ||
[[EXPOSE 80]] | [[EXPOSE 80]] | ||
− | |||
− | docker run php-apache | + | [[docker run -d]] php-apache -n php-apache-app |
Hello World!We are learning PHP!% | Hello World!We are learning PHP!% | ||
== Related == | == Related == | ||
[[php:apache]] image | [[php:apache]] image | ||
+ | [[docker run -d]] php-apache-app | ||
== See also == | == See also == |
Latest revision as of 13:30, 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 -d php-apache -n php-apache-app Hello World!We are learning PHP!%
Related[edit]
php:apache image docker run -d php-apache-app
See also[edit]
Advertising: