Skip to content
Snippets Groups Projects
Commit 82a53b9a authored by Thomas Woerner's avatar Thomas Woerner
Browse files

infra/image/shcontainer: New container_copy and container_fetch

container_copy can be used to copy a file to the container,
container_fetch can be used to copy a file from the container.

For more information, please have a look at the podman-cp man page.
parent d5804318
No related branches found
No related tags found
No related merge requests found
......@@ -175,3 +175,23 @@ container_image_list() {
container_check() {
[ -n "$(command -v "podman")" ] || die "podman is required."
}
container_copy() {
local name="${1}"
local source="${2}"
local destination="${3}"
log info "= Copying ${source} to ${name}:${destination} ="
podman cp "${source}" "${name}:${destination}"
echo
}
container_fetch() {
local name="${1}"
local source="${2}"
local destination="${3}"
log info "= Copying ${name}:${source} to ${destination} ="
podman cp "${name}:${source}" "${destination}"
echo
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment