https://github.com/gh640/copy-docker-volumes-to-host
🐳 📦 A sample Python script to copy all Docker (named) volumes to host (for Docker for Mac).
https://github.com/gh640/copy-docker-volumes-to-host
docker macos python3
Last synced: 2 months ago
JSON representation
🐳 📦 A sample Python script to copy all Docker (named) volumes to host (for Docker for Mac).
- Host: GitHub
- URL: https://github.com/gh640/copy-docker-volumes-to-host
- Owner: gh640
- Created: 2021-11-06T03:14:00.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-11-06T03:31:07.000Z (over 4 years ago)
- Last Synced: 2025-07-09T04:04:57.331Z (12 months ago)
- Topics: docker, macos, python3
- Language: Python
- Homepage:
- Size: 1000 Bytes
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Copy Docker volumes to host
This is a sample Python script to copy all Docker (named) volumes to host.
## Prerequisites
- Python 3
- Docker for Mac
## Usage
Check how things work with `--dry-run` option.
```bash
python3 copy_docker_volumes_to_host.py --dry-run
```
Output:
```text
Total volumes: 5
volume_a:
volume_b:
volume_c:
volume_d:
volume_e:
```
If the behavior looks fine, run the script without `--dry-run`. Volumes will be copied into the `volumes/` directory.
```bash
python3 copy_docker_volumes_to_host.py
```
Output:
```text
Total volumes: 5
volume_a:
return code: 0
volume_b:
return code: 0
volume_c:
return code: 0
volume_d:
return code: 0
volume_e:
return code: 0
```