2
0

export-docs-from-image 314 B

1234567891011
  1. #!/bin/bash
  2. set -e
  3. docs_container_id=$(podman create "$IMAGE_NAME")
  4. podman cp $docs_container_id:/usr/share/nginx/html - > borgmatic-docs-dump.tar
  5. tar xf borgmatic-docs-dump.tar
  6. rm borgmatic-docs-dump.tar
  7. mv html borgmatic-docs
  8. tar cfz borgmatic-docs.tar.gz borgmatic-docs
  9. podman rm --volumes $docs_container_id