Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
f30_podman [2019/03/30 21:39] – [Overview] rpjdayf30_podman [2019/03/31 15:55] (current) – [cp] rpjday
Line 106: Line 106:
 ==== ASSORTED ==== ==== ASSORTED ====
  
-  * cp+  * cp                     [DONE]
   * generate-kube   * generate-kube
   * generate   * generate
Line 117: Line 117:
   * unmount   * unmount
   * varlink   * varlink
 +  * version                [DONE]
  
  
Line 287: Line 288:
 $ docker inspect fedora:28 $ docker inspect fedora:28
 $ docker inspect --latest $ docker inspect --latest
 +</code>
 +
 +===== cp =====
 +
 +<code>
 +NAME
 +       podman-cp - Copy files/folders between a container and the
 +       local filesystem
 +
 +SYNOPSIS
 +       podman cp [CONTAINER:]SRC_PATH [CONTAINER:]DEST_PATH
 +</code>
 +
 +Start a Ubuntu container:
 +
 +<code>
 +$ podman run -it --rm ubuntu bash
 +</code>
 +
 +Identify it, and copy the file ''/etc/os-release'' to local ''/tmp'':
 +
 +<code>
 +$ podman ps
 +CONTAINER ID  IMAGE                            COMMAND  CREATED        STATUS            PORTS  NAMES
 +cb29f21de0df  docker.io/library/ubuntu:latest  bash     3 minutes ago  Up 3 minutes ago         pensive_lamport
 +</code>
 +
 +<code>
 +$ podman cp pensive_lamport:etc/os-release /tmp/os
 +$ cat/tmp/os
 +NAME="Ubuntu"
 +VERSION="18.04.2 LTS (Bionic Beaver)"
 +ID=ubuntu
 +ID_LIKE=debian
 +PRETTY_NAME="Ubuntu 18.04.2 LTS"
 +VERSION_ID="18.04"
 +...  etc etc ...
 +</code>
 +
 +Copy from local filesystem to container:
 +
 +<code>
 +$ podman cp /etc/os-release pensive_lamport:tmp
 +</code>
 +
 +===== Removing things =====
 +
 +Remove containers:
 +
 +<code>
 +$ podman rm <ctrID>
 +$ podman rm [-a|--all]
 </code> </code>
  
  • f30_podman.1553981956.txt.gz
  • Last modified: 2019/03/30 21:39
  • by rpjday