summaryrefslogtreecommitdiff
path: root/cmd/podman/cp.go
Commit message (Collapse)AuthorAge
* implement cp reads tar file from stdin/stdoutQi Wang2019-05-09
| | | | | | enables podman cp uses - to stream a tar archive from STDIN or to STDOUT. Signed-off-by: Qi Wang <qiwan@redhat.com>
* runtime: pass down the contextGiuseppe Scrivano2019-04-26
| | | | Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* Fix segfaults attribute to missing optionsbaude2019-04-15
| | | | | | | | | In cases where the remote client culls options to a command, we need to be sure that the lookup for that flag does not result in a nil pointer. To do so, we add a Remote attribute to the podman struct and then cli helper funcs are now aware they are remote. Signed-off-by: baude <bbaude@redhat.com>
* fix bug podman cp directoryQi Wang2019-04-04
| | | | | | | | | | | | | | | | | | | | | `podman cp` used to copy the contents under the source directory to the destination. But according to the specification in podman-cp.md. it should copy the whole directory to the destination if the destination directory already exists. - src dir ends with /., copy the contents to dest dir - src dir does not end with /. - dest dir /home does not exist, copy the contents - dest dir /home exists, copy the directory ``` $ sudo podman cp /home/qiwan/Documents/empty 7c47:/home $ sudo podman exec -it 7c47 ls /home $ $ sudo podman cp /home/qiwan/Documents/empty 7c47:/home $ sudo podman exec -it 7c47 ls /home empty ``` Signed-off-by: Qi Wang <qiwan@redhat.com>
* rootless: use a single user namespaceGiuseppe Scrivano2019-04-01
| | | | | | | | | | | | | | | | | | | | | simplify the rootless implementation to use a single user namespace for all the running containers. This makes the rootless implementation behave more like root Podman, where each container is created in the host environment. There are multiple advantages to it: 1) much simpler implementation as there is only one namespace to join. 2) we can join namespaces owned by different containers. 3) commands like ps won't be limited to what container they can access as previously we either had access to the storage from a new namespace or access to /proc when running from the host. 4) rootless varlink works. 5) there are only two ways to enter in a namespace, either by creating a new one if no containers are running or joining the existing one from any container. Containers created by older Podman versions must be restarted. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* rootless: remove SkipStorageSetup()Giuseppe Scrivano2019-04-01
| | | | | | | | in the few places where we care about skipping the storage initialization, we can simply use the process effective UID, instead of relying on a global boolean flag. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* vendor buildah, image, storage, cniValentin Rothberg2019-03-28
| | | | Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
* Fix help commands to show short and long description.Daniel J Walsh2019-03-07
| | | | | | Cleanup lots of help information to look good when displayed. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
* add flag --extract tar file in podman cpQi Wang2019-03-06
| | | | Signed-off-by: Qi Wang <qiwan@redhat.com>
* Don't extract tar file in podman cpQi Wang2019-03-04
| | | | Signed-off-by: Qi Wang <qiwan@redhat.com>
* Better usage synopses for subcommandsEd Santiago2019-02-26
| | | | | | | Conceptually simple: include, where applicable, a brief description of command-line options for each subcommand. Signed-off-by: Ed Santiago <santiago@redhat.com>
* cmd: support rootless mode for cp commandGiuseppe Scrivano2019-02-22
| | | | Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
* 'podman cp' copy between host and containerQi Wang2019-02-14
Signed-off-by: Qi Wang <qiwan@redhat.com>