Dockit is a powerful and simple CLI tool that allows you to build Docker images directly from GitHub repositories with ease. Whether you're a developer, DevOps engineer, or just looking to quickly containerize a project, Dockit simplifies the process of building Docker images from remote repositories.
- 🚀 Quick Docker image building from GitHub repositories
- 🔍 Automatic Dockerfile detection in repository subfolders
- 🧹 Automatic cleanup of temporary cloned repositories
- 📝 Detailed logging and image information display
- 🌐 Support for specifying branches
- 🏷️ Custom image tagging
Before using Dockit, ensure you have the following installed:
- Go (1.21 or later)
- Docker
- Git
- Clone the repository:
git clone https://github.com/sundaram2021/dockit.git
cd dockit
- Build the application:
go mod tidy
go build -o dockit
go install github.com/sundaram2021/dockit@latest
# Build Docker image from a GitHub repository
dockit https://github.com/example/repo
# Build image from a specific branch
dockit --url https://github.com/example/repo --branch develop
# Custom image tag
dockit --url https://github.com/example/repo --tag my-custom-image
# Verbose logging
dockit --url https://github.com/example/repo --verbose
Flag | Description | Default Value |
---|---|---|
--url |
GitHub repository URL (required) | None |
--branch |
Branch to clone | main |
--tag |
Custom Docker image tag | Repo name |
--output |
Custom output directory | Temp directory |
--verbose |
Enable verbose logging | false |
dockit https://github.com/trulymittal/docker --branch master --tag latest
- Clone the specified GitHub repository
- Automatically detect Dockerfile in repository
- Build Docker image using detected Dockerfile
- Log detailed image information
- Clean up temporary files
- Ensure Docker is installed and running
- Check repository URL and branch name
- Use
--verbose
flag for detailed logs - Verify Dockerfile exists in the repository
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Your Name - @jhsundaram
Project Link: https://github.com/sundaram2021/dockit
Happy Dockerizing! 🐳🚀