Difference between revisions of "Docker cp"

From wikieduonline
Jump to navigation Jump to search
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Copy files/folders between a container and the local filesystem
+
{{lc}}
 +
<code>[[docker]] cp</code> copy [[files]] and or [[folders]] between a container and the local filesystem
 
* https://docs.docker.com/engine/reference/commandline/cp/
 
* https://docs.docker.com/engine/reference/commandline/cp/
  
 
  docker cp <containerId_or_name>:/file/path/within/container /host/path/target
 
  docker cp <containerId_or_name>:/file/path/within/container /host/path/target
 
  (no output)
 
  (no output)
 +
 +
 +
[[docker cp]] ./some_file CONTAINER:/work
  
 
== Related commands ==
 
== Related commands ==
 +
* <code>[[docker ps]]</code>
 
* <code>[[multipass transfer]]</code>
 
* <code>[[multipass transfer]]</code>
 +
* <code>[[kubectl cp]]</code>
 +
* <code>[[--platform]]</code>
 +
* <code>[[docker pull]]</code>
 +
* <code>[[docker export]] adoring_kowalevski | [[tar t]]</code>
 +
* <code>[[docker commit]]</code>
  
 
== See also ==
 
== See also ==

Latest revision as of 11:20, 24 January 2024

Advertising: