summaryrefslogtreecommitdiff
path: root/docs/kpod-cp.1.md
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2017-11-01 11:24:59 -0400
committerMatthew Heon <matthew.heon@gmail.com>2017-11-01 11:24:59 -0400
commita031b83a09a8628435317a03f199cdc18b78262f (patch)
treebc017a96769ce6de33745b8b0b1304ccf38e9df0 /docs/kpod-cp.1.md
parent2b74391cd5281f6fdf391ff8ad50fd1490f6bf89 (diff)
downloadpodman-a031b83a09a8628435317a03f199cdc18b78262f.tar.gz
podman-a031b83a09a8628435317a03f199cdc18b78262f.tar.bz2
podman-a031b83a09a8628435317a03f199cdc18b78262f.zip
Initial checkin from CRI-O repo
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Diffstat (limited to 'docs/kpod-cp.1.md')
-rw-r--r--docs/kpod-cp.1.md46
1 files changed, 46 insertions, 0 deletions
diff --git a/docs/kpod-cp.1.md b/docs/kpod-cp.1.md
new file mode 100644
index 000000000..eea48e6c9
--- /dev/null
+++ b/docs/kpod-cp.1.md
@@ -0,0 +1,46 @@
+% kpod(1) kpod-cp - Copy content between container's file system and the host
+% Dan Walsh
+# kpod-cp "1" "August 2017" "kpod"
+
+## NAME
+kpod-cp - Copy files/folders between a container and the local filesystem.
+
+## Description
+We chose not to implement the `cp` feature in `kpod` even though the upstream Docker
+project has it. We have a much stronger capability. Using standard kpod-mount
+and kpod-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=$(kpod mount CONTAINERID)
+ cp -R ${mnt}/etc/foobar /tmp
+ kpod umount CONTAINERID
+
+If you want to untar a tar ball into a container, you can execute these commands:
+
+ mnt=$(kpod mount CONTAINERID)
+ tar xf content.tgz -C ${mnt}
+ kpod 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=$(kpod mount CONTAINERID)
+ dnf install --installroot=${mnt} httpd
+ chroot ${mnt} rm -rf /var/log/dnf /var/cache/dnf
+ kpod umount CONTAINERID
+
+This shows that using `kpod mount` and `kpod 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
+kpod(1), kpod-mount(1), kpod-umount(1)