🐳 S3Docker
🎯 Why S3Docker?
Managing Docker images across multiple environments and teams can be challenging:
- Private registries can be expensive and complex to maintain
- Manual image transfer is time-consuming and error-prone
- Version management and rollbacks can be difficult
S3Docker solves these problems by:
- Using AWS S3 as a cost-effective storage solution
- Providing simple commands for image management
- Automatically handling versioning and archiving
- Supporting multiple configuration profiles for different environments
✨ Features
- 📦 Simple push/pull commands for Docker images
- 🔄 Automatic version archiving
- 📝 Multiple named configuration profiles
- 📊 Image listing with size and modification info
- 🧹 Automatic cleanup of temporary files
- 🔒 Secure AWS credentials management
🚀 Installation
pip install s3docker
📋 Prerequisites
- Python 3.6 or higher
- Docker installed and running
- AWS account with S3 access
- AWS credentials with the following permissions:
s3:PutObjects3:GetObjects3:ListBucket
🛠️ Configuration
Initial Setup
s3docker config
Follow the interactive wizard to configure:
- Profile name (e.g., 'prod', 'staging', 'default')
- AWS Access Key ID
- AWS Secret Access Key
- AWS Region (default: us-east-1)
- S3 Bucket name
- S3 Path prefix (default: docker-images)
Managing Multiple Profiles
List all configured profiles:
s3docker configs
📚 Usage Guide
Pushing Images to S3
# Using default profile
s3docker push myapp:latest
# Using specific profile
s3docker push myapp:latest --to prod
# Replace existing image
s3docker push myapp:latest --replace
# Specify temporary directory
s3docker push myapp:latest --temp /path/to/temp
s3docker push myapp:latest --temp . # Use current directory
Pulling Images from S3
# Using default profile
s3docker pull myapp:latest
# Using specific profile
s3docker pull myapp:latest --from prod
# Specify temporary directory
s3docker pull myapp:latest --temp /path/to/temp
s3docker pull myapp:latest --temp . # Use current directory
Listing Available Images
# List images in default profile
s3docker list
# List images in specific profile
s3docker list --from prod
🔧 How It Works
-
Push Operation:
- Saves Docker image to temporary tar file
- If image exists in S3:
- Moves existing image to archive folder (if --replace not used)
- Archives include timestamps for version tracking
- Uploads new image to S3
- Cleans up temporary files
-
Pull Operation:
- Downloads tar file from S3
- Loads image into Docker
- Automatically removes temporary files
-
Configuration Storage:
- Configs stored in
~/.s3docker/configs.json - Separate profiles for different environments
- Secure credential storage
- Configs stored in
🌟 Best Practices
-
Profile Management:
- Use different profiles for development/staging/production
- Keep production credentials separate
- Regular credential rotation
-
Image Management:
- Use specific tags instead of 'latest'
- Utilize --replace flag carefully
- Regular cleanup of archived versions
🤝 Contributing
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
📝 License
MIT License - feel free to use and modify as needed!
🆘 Support
- Create an issue for bug reports
- Feature requests are welcome
- PRs accepted
🔮 Future Plans
- Support for image tags listing
- Bulk upload/download
- Compression options
- Image metadata support
- Integration with CI/CD pipelines
Made with ❤️ for the Docker community
Release files for s3docker 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| s3docker-1.1.2.tar.gz | 9.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| s3docker-1.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.9 kB
Release files / s3docker-1.1.2.tar.gz
| Download URL | s3docker-1.1.2.tar.gz |
|---|---|
| Size | 9.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
894255cca1789a291e9456aa5a5bd587de2a8196c865ff4c77481ea32ed5ab84
|
|
BLAKE2b-256 checksum How to use checksums |
9e472d685330cb17277126960ce98ec1637ac13be642513ef93b75daf2d20876
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|
Release files / s3docker-1.1.2-py3-none-any.whl
| Download URL | s3docker-1.1.2-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b8f63166b9b48239515367727cb4e9de4f0be9e5f4d8d607bef6366bcfac0cd0
|
|
BLAKE2b-256 checksum How to use checksums |
d4e663f961f522a76a86bf484ecac1bfb84f20fb55be4bcdae5614b09d8d93e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.8
|