A Docker image for the Berkeley Balanced Copy Protocol (bbcp) - a high-performance copy utility.
ps command compatibility# Pull the image
docker pull marioja/bbcp:latest
# Copy a file
docker run --rm -v /source:/src -v /destination:/dst marioja/bbcp:latest /src/file /dst/
# Show help
docker run --rm marioja/bbcp:latest --help
docker run --rm -v $(pwd):/data marioja/bbcp:latest /data/source.txt /data/destination.txt
docker run --rm -v $(pwd):/data marioja/bbcp:latest -c /data/source.txt /data/destination.txt.compressed
docker run --rm -v $(pwd):/data marioja/bbcp:latest -P 5 /data/largefile.txt /data/largefile_copy.txt
docker run --rm --network host marioja/bbcp:latest user@remote-host:/path/to/file /local/destination/
Run the setup script to automatically configure your repository:
.\setup.ps1 -DockerHubUsername "your-dockerhub-username"
This script will:
Note: Don't forget to update the badges at the top of the README with your GitHub username and Docker Hub username.
Replace your-dockerhub-username with your actual Docker Hub username in these files:
.github/workflows/docker-build-deploy.yml (line 12)README.md (all example commands)In your GitHub repository, go to Settings → Secrets and variables → Actions and add:
| Secret Name | Description | How to Get |
|---|---|---|
DOCKERHUB_USERNAME | Your Docker Hub username | Your Docker Hub profile |
DOCKERHUB_TOKEN | Docker Hub access token | Docker Hub → Account Settings → Security → Access Tokens |
GitHub Actions (or similar)DOCKERHUB_TOKEN secret in GitHubThe workflow automatically triggers on:
main or master branchv (e.g., v1.0.0)To trigger manually:
# Tag a release
git tag v1.0.0
git push origin v1.0.0
# Or push to main branch
git push origin main
# Build the image
docker build -t bbcp:local .
# Test the image
docker run --rm bbcp:local --help
# Copy a file locally
docker run --rm -v ${PWD}:/data bbcp:local /data/source.txt /data/destination.txt
# Run the test suite (PowerShell)
.\test.ps1 -ImageName "bbcp:local"
# Or on Linux/macOS (Bash)
./test.sh bbcp:local
Error: Username/Token is incorrect
Solution:
DOCKERHUB_USERNAME matches your Docker Hub username exactlyError: Failed to solve: process "/bin/sh -c make..." didn't complete successfully
Solution:
Error: Multiple platforms feature is currently not supported for docker driver
Solution:
docker/setup-buildx-action which automatically handles thisError: repository does not exist or may require authentication
Solution:
IMAGE_NAME in workflowCheck if your image was built successfully:
# Pull and test your image
docker pull marioja/bbcp:latest
docker run --rm marioja/bbcp:latest --version
Expected output:
bbcp (C) 2002-2020 by the Board of Trustees of the Leland Stanford, Jr., University
All Rights Reserved. See 'bbcp -?' for complete license terms.
Version: 17.12.00.00.0
This image includes critical patches for Docker container reliability:
Problem: Original bbcp fails with "Unable to decode item 9 in file specification" when handling files with missing filename fields.
Solution: Patched bbcp_FileSpec.C to gracefully handle specifications with only 8 fields instead of requiring all 9.
Problem: In Docker containers, gethostname() returns unresolvable container IDs, causing "Unable to determine the callback host!" errors.
Solution: Patched bbcp_NetAddr.C constructor to fall back to localhost when hostname resolution fails, ensuring the network address object remains in a valid state.
These patches eliminate intermittent failures when copying Docker volumes and allow bbcp to work reliably in containerized environments.
| Variable | Description | Default |
|---|---|---|
| No environment variables required |
Mount your source and destination directories:
This Docker image packages the bbcp utility. Please refer to the original bbcp license and documentation at: http://www.slac.stanford.edu/~abh/bbcp
If you encounter any issues with this Docker image, please report them on the GitHub repository.
Note: This is an unofficial Docker image for bbcp. For official bbcp documentation and support, visit the SLAC website.
Content type
Image
Digest
sha256:025a7773c…
Size
28.7 MB
Last updated
over 1 year ago
docker pull marioja/bbcp