mirror of
https://github.com/kreuzwerker/terraform-provider-docker.git
synced 2026-06-14 20:04:15 -04:00
* feat(actions): add image save load export Agent-Logs-Url: https://github.com/kreuzwerker/terraform-provider-docker/sessions/4b7d6db0-7d68-4713-8883-88af93b3468b Co-authored-by: Junkern <3775779+Junkern@users.noreply.github.com> * docs(actions): generate new action docs Agent-Logs-Url: https://github.com/kreuzwerker/terraform-provider-docker/sessions/4b7d6db0-7d68-4713-8883-88af93b3468b Co-authored-by: Junkern <3775779+Junkern@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Junkern <3775779+Junkern@users.noreply.github.com>
1.1 KiB
1.1 KiB
| page_title | subcategory | description |
|---|---|---|
| docker_container_export Action - terraform-provider-docker | Export a container filesystem as a tar archive, similar to docker container export. |
docker_container_export (Action)
Export a container filesystem as a tar archive, similar to docker container export.
Example Usage
resource "docker_image" "busybox" {
name = "busybox:1.35.0"
}
resource "docker_container" "target" {
name = "docker-container-export-example"
image = docker_image.busybox.image_id
must_run = true
command = ["sh", "-c", "sleep 300"]
lifecycle {
action_trigger {
events = [after_create]
actions = [action.docker_container_export.export]
}
}
}
action "docker_container_export" "export" {
config {
container = docker_container.target.name
output = pathexpand("./container-export.tar")
}
}
Schema
Required
container(String) Container name or ID to export.output(String) Path to the output tar archive file.