Difference between revisions of "COPY"
Jump to navigation
Jump to search
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | * https://docs.docker.com/reference/dockerfile/#copy | ||
+ | |||
<code>COPY . .</code> | <code>COPY . .</code> | ||
+ | |||
+ | <code>COPY hom* /mydir/</code> | ||
<code>[[COPY --from=builder]]</code> | <code>[[COPY --from=builder]]</code> | ||
+ | |||
+ | --from=[[your-repo]]/your-image | ||
+ | |||
+ | |||
+ | {{php:apache Dockerfile}} | ||
+ | |||
+ | == Errors == | ||
+ | * <code>[[When using COPY with more than one source file, the destination must be a directory and end with a /]]</code> | ||
== Related == | == Related == | ||
Line 7: | Line 19: | ||
== See also == | == See also == | ||
+ | * {{COPY}} | ||
* {{Dockerfile}} | * {{Dockerfile}} | ||
[[Category:Docker]] | [[Category:Docker]] |
Latest revision as of 17:43, 22 February 2024
COPY . .
COPY hom* /mydir/
--from=your-repo/your-image
FROM php:apache # Copy your PHP files to the document root COPY index.php /var/www/html # Expose the web server port EXPOSE 80
Errors[edit]
When using COPY with more than one source file, the destination must be a directory and end with a /
Related[edit]
See also[edit]
Advertising: