{"id":30583954,"url":"https://github.com/coderamp-labs/gitcontainer","last_synced_at":"2025-08-29T09:02:46.289Z","repository":{"id":298297417,"uuid":"999458516","full_name":"coderamp-labs/gitcontainer","owner":"coderamp-labs","description":"Replace \"github\" with \"gitcontainer\" in URLs to generate a dockerfile.","archived":false,"fork":false,"pushed_at":"2025-06-11T18:02:52.000Z","size":157,"stargazers_count":92,"open_issues_count":4,"forks_count":9,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-10T09:32:22.838Z","etag":null,"topics":["container","docker"],"latest_commit_sha":null,"homepage":"https://gitcontainer.com","language":"Jinja","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coderamp-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-10T09:27:20.000Z","updated_at":"2025-07-10T00:33:39.000Z","dependencies_parsed_at":"2025-07-10T09:33:56.189Z","dependency_job_id":"1c37d49c-0663-423b-a7ac-43a07667ed3d","html_url":"https://github.com/coderamp-labs/gitcontainer","commit_stats":null,"previous_names":["cyclotruc/gitcontainer","coderamp-labs/gitcontainer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/coderamp-labs/gitcontainer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderamp-labs%2Fgitcontainer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderamp-labs%2Fgitcontainer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderamp-labs%2Fgitcontainer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderamp-labs%2Fgitcontainer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coderamp-labs","download_url":"https://codeload.github.com/coderamp-labs/gitcontainer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderamp-labs%2Fgitcontainer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272658761,"owners_count":24971603,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-29T02:00:10.610Z","response_time":87,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["container","docker"],"created_at":"2025-08-29T09:02:37.684Z","updated_at":"2025-08-29T09:02:46.276Z","avatar_url":"https://github.com/coderamp-labs.png","language":"Jinja","funding_links":[],"categories":["Jinja"],"sub_categories":[],"readme":"![Gitcontainer](docs/image.png)\n\n# Gitcontainer 🐳\n\n**Turn any GitHub repository into a production-ready Docker container with AI-powered Dockerfile generation.**\n\n[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)\n[![Python 3.9+](https://img.shields.io/badge/python-3.9+-blue.svg)](https://www.python.org/downloads/)\n[![FastAPI](https://img.shields.io/badge/FastAPI-0.68+-00a393.svg)](https://fastapi.tiangolo.com/)\n\nGitcontainer is an AI-powered web application that automatically generates production-ready Dockerfiles by analyzing GitHub repositories. Simply paste a GitHub URL and get a tailored Dockerfile with intelligent base image selection, dependency management, and Docker best practices.\n\n## 🌟 Quick Access\n\nSimply replace `github.com` with `gitcontainer.com` in any GitHub repository URL to instantly access the Dockerfile generation page for that repository.\n\nFor example:\n```\nhttps://github.com/username/repo  →  https://gitcontainer.com/username/repo\n```\n\n## ✨ Features\n\n- **🔄 Instant URL Access**: Just replace 'github.com' with 'gitcontainer.com' in any GitHub URL\n- **🤖 AI-Powered Analysis**: Uses OpenAI GPT-4 to analyze repository structure and generate intelligent Dockerfiles\n- **⚡ Real-time Streaming**: Watch the AI generate your Dockerfile in real-time with WebSocket streaming\n- **🎯 Smart Detection**: Automatically detects technology stacks (Python, Node.js, Java, Go, etc.)\n- **🔧 Production-Ready**: Generates Dockerfiles following best practices with proper security, multi-stage builds, and optimization\n- **📋 Additional Instructions**: Add custom requirements for specialized environments\n- **📄 Docker Compose**: Automatically suggests docker-compose.yml for complex applications\n- **🎨 Modern UI**: Clean, responsive interface with Monaco editor for syntax highlighting\n- **📱 Mobile Friendly**: Works seamlessly on desktop and mobile devices\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- Python 3.9 or higher\n- Git\n- OpenAI API key\n\n### Installation\n\n1. **Clone the repository:**\n   ```bash\n   git clone https://github.com/cyclotruc/gitcontainer.git\n   cd gitcontainer\n   ```\n\n2. **Install dependencies:**\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n3. **Set up environment variables:**\n   ```bash\n   # Create .env file\n   echo \"OPENAI_API_KEY=your_openai_api_key_here\" \u003e .env\n   ```\n\n4. **Run the application:**\n   ```bash\n   python app.py\n   ```\n\n5. **Open your browser:**\n   Navigate to `http://localhost:8000`\n\n## 🛠️ How It Works\n\n1. **URL Processing**: Access any repository by replacing 'github.com' with 'gitcontainer.com' in the URL\n2. **Repository Cloning**: Gitcontainer clones the GitHub repository locally using Git\n3. **Code Analysis**: Uses [gitingest](https://github.com/cyclotruc/gitingest) to analyze the repository structure and extract relevant information\n4. **AI Generation**: Sends the analysis to OpenAI GPT-4 with specialized prompts for Dockerfile generation\n5. **Smart Optimization**: The AI considers:\n   - Technology stack detection\n   - Dependency management\n   - Security best practices\n   - Multi-stage builds when beneficial\n   - Port configuration\n   - Environment variables\n   - Health checks\n\n## 📁 Project Structure\n\n```\ncyclotruc-gitcontainer/\n├── app.py                 # Main FastAPI application\n├── requirements.txt       # Python dependencies\n├── .env                  # Environment variables (create this)\n├── static/               # Static assets (icons, CSS)\n├── templates/\n│   └── index.jinja       # Main HTML template\n└── tools/                # Core functionality modules\n    ├── __init__.py\n    ├── create_container.py  # AI Dockerfile generation\n    ├── git_operations.py    # GitHub repository cloning\n    └── gitingest.py        # Repository analysis\n```\n\n## 🔧 Configuration\n\n### Environment Variables\n\n| Variable | Description | Required |\n|----------|-------------|----------|\n| `OPENAI_API_KEY` | Your OpenAI API key | Yes |\n| `PORT` | Server port (default: 8000) | No |\n| `HOST` | Server host (default: 0.0.0.0) | No |\n\n### Advanced Usage\n\nYou can use the tools programmatically:\n\n```python\nfrom tools import clone_repo_tool, gitingest_tool, create_container_tool\nimport asyncio\n\nasync def generate_dockerfile(github_url):\n    # Clone repository\n    clone_result = await clone_repo_tool(github_url)\n    \n    # Analyze with gitingest\n    analysis = await gitingest_tool(clone_result['local_path'])\n    \n    # Generate Dockerfile\n    dockerfile = await create_container_tool(\n        gitingest_summary=analysis['summary'],\n        gitingest_tree=analysis['tree'],\n        gitingest_content=analysis['content']\n    )\n    \n    return dockerfile\n\n# Usage\nresult = asyncio.run(generate_dockerfile(\"https://github.com/user/repo\"))\nprint(result['dockerfile'])\n```\n\n## 🎨 Customization\n\n### Adding Custom Instructions\n\nUse the \"Additional instructions\" feature to customize generation:\n\n- `\"Use Alpine Linux for smaller image size\"`\n- `\"Include Redis and PostgreSQL\"`\n- `\"Optimize for production deployment\"`\n- `\"Add development tools for debugging\"`\n\n## 📝 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- **[OpenAI](https://openai.com/)** for providing the GPT-4 API\n- **[gitingest](https://github.com/cyclotruc/gitingest)** for repository analysis capabilities\n- **[FastAPI](https://fastapi.tiangolo.com/)** for the excellent web framework\n- **[Monaco Editor](https://microsoft.github.io/monaco-editor/)** for code syntax highlighting\n\n## 🔗 Links\n\n- **GitHub Repository**: [https://github.com/cyclotruc/gitcontainer](https://github.com/cyclotruc/gitcontainer)\n- **Demo**: Try it live with example repositories\n- **Issues**: [Report bugs or request features](https://github.com/cyclotruc/gitcontainer/issues)\n\n---\n\n**Made with ❤️ by [Romain Courtois](https://github.com/cyclotruc)**\n\n*Turn any repository into a container in seconds!*","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderamp-labs%2Fgitcontainer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderamp-labs%2Fgitcontainer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderamp-labs%2Fgitcontainer/lists"}