summaryrefslogtreecommitdiff
path: root/docs/podman-cp.1.md
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2017-12-15 16:58:36 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2017-12-18 16:46:05 +0000
commit5770dc2640c216525ab84031e3712fcc46b3b087 (patch)
tree8a1c5c4e4a6ce6a35a3767247623a62bfd698f77 /docs/podman-cp.1.md
parentde3468e120d489d046c08dad72ba2262e222ccb1 (diff)
downloadpodman-5770dc2640c216525ab84031e3712fcc46b3b087.tar.gz
podman-5770dc2640c216525ab84031e3712fcc46b3b087.tar.bz2
podman-5770dc2640c216525ab84031e3712fcc46b3b087.zip
Rename all references to kpod to podman
The decision is in, kpod is going to be named podman. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #145 Approved by: umohnani8
Diffstat (limited to 'docs/podman-cp.1.md')
-rw-r--r--docs/podman-cp.1.md46
1 files changed, 46 insertions, 0 deletions
diff --git a/docs/podman-cp.1.md b/docs/podman-cp.1.md
new file mode 100644
index 000000000..0c23d6f10
--- /dev/null
+++ b/docs/podman-cp.1.md
@@ -0,0 +1,46 @@
+% podman(1) podman-cp - Copy content between container's file system and the host
+% Dan Walsh
+# podman-cp "1" "August 2017" "podman"
+
+## NAME
+podman-cp - Copy files/folders between a container and the local filesystem.
+
+## Description
+We chose not to implement the `cp` feature in `podman` even though the upstream Docker
+project has it. We have a much stronger capability. Using standard podman-mount
+and podman-umount, we can take advantage of the entire linux tool chain, rather
+then just cp.
+
+If a user wants to copy contents out of a container or into a container, they
+can execute a few simple commands.
+
+You can copy from the container's file system to the local machine or the
+reverse, from the local filesystem to the container.
+
+If you want to copy the /etc/foobar directory out of a container and onto /tmp
+on the host, you could execute the following commands:
+
+ mnt=$(podman mount CONTAINERID)
+ cp -R ${mnt}/etc/foobar /tmp
+ podman umount CONTAINERID
+
+If you want to untar a tar ball into a container, you can execute these commands:
+
+ mnt=$(podman mount CONTAINERID)
+ tar xf content.tgz -C ${mnt}
+ podman umount CONTAINERID
+
+One last example, if you want to install a package into a container that
+does not have dnf installed, you could execute something like:
+
+ mnt=$(podman mount CONTAINERID)
+ dnf install --installroot=${mnt} httpd
+ chroot ${mnt} rm -rf /var/log/dnf /var/cache/dnf
+ podman umount CONTAINERID
+
+This shows that using `podman mount` and `podman umount` you can use all of the
+standard linux tools for moving files into and out of containers, not just
+the cp command.
+
+## SEE ALSO
+podman(1), podman-mount(1), podman-umount(1)