-
-
Notifications
You must be signed in to change notification settings - Fork 164
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
hello, was adviced to create a new issue for a way to use the podman cp command to copy files from a container.
use case:
sometimes, i will make a temp container in order to just copy files that i can build off of (usually configs)
podman run -d --name nginx.vols nginx:1.23.2
cont_num=$(podman ps -aqf "name=nginx.vols")
podman cp $cont_num:/etc/nginx/. /home/user/volumes/nginx
podman stop nginx.vols && podman rm nginx.vols
this would be super useful, since I have to use shell:
- name: 4. copy config files from temp nginx container into volumes dir
shell: |
cont_num=$(podman ps -aqf "name=nginx.vols")
podman cp $cont_num:/etc/nginx/. /home/user/volumes/nginx
podman stop nginx.vols && podman rm nginx.vols
args:
executable: /bin/bash
pedrox-hs, DilasserT and IanLee1521
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request