1
+ ![ Gitcontainer] ( docs/image.png )
2
+
1
3
# Gitcontainer 🐳
2
4
3
5
** Turn any GitHub repository into a production-ready Docker container with AI-powered Dockerfile generation.**
@@ -54,33 +56,6 @@ Gitcontainer is an AI-powered web application that automatically generates produ
54
56
5 . ** Open your browser:**
55
57
Navigate to ` http://localhost:8000 `
56
58
57
- ## 🐳 Docker Deployment
58
-
59
- ### Build and run with Docker:
60
-
61
- ``` bash
62
- # Build the image
63
- docker build -t gitcontainer .
64
-
65
- # Run the container
66
- docker run -p 8000:8000 -e OPENAI_API_KEY=your_api_key gitcontainer
67
- ```
68
-
69
- ### Using docker-compose:
70
-
71
- ``` yaml
72
- version : ' 3.8'
73
- services :
74
- gitcontainer :
75
- build : .
76
- ports :
77
- - " 8000:8000"
78
- environment :
79
- - OPENAI_API_KEY=your_openai_api_key_here
80
- volumes :
81
- - ./repos:/app/repos # Persist cloned repositories
82
- ` ` `
83
-
84
59
## 🛠️ How It Works
85
60
86
61
1 . ** Repository Cloning** : Gitcontainer clones the GitHub repository locally using Git
@@ -112,27 +87,7 @@ cyclotruc-gitcontainer/
112
87
└── gitingest.py # Repository analysis
113
88
```
114
89
115
- ## 🔧 API Reference
116
-
117
- ### WebSocket Streaming
118
-
119
- Connect to ` /ws/{session_id} ` for real-time generation updates:
120
-
121
- ``` javascript
122
- const ws = new WebSocket (' ws://localhost:8000/ws/session_123' );
123
- ws .onmessage = (event ) => {
124
- const data = JSON .parse (event .data );
125
- console .log (data .type , data .content );
126
- };
127
- ```
128
-
129
- ### Health Check
130
-
131
- ``` bash
132
- curl http://localhost:8000/health
133
- ```
134
-
135
- ## 🎛️ Configuration
90
+ ## 🔧 Configuration
136
91
137
92
### Environment Variables
138
93
@@ -171,36 +126,6 @@ result = asyncio.run(generate_dockerfile("https://github.com/user/repo"))
171
126
print (result[' dockerfile' ])
172
127
```
173
128
174
- ## 🤝 Contributing
175
-
176
- We welcome contributions! Here's how to get started:
177
-
178
- 1 . Fork the repository
179
- 2 . Create a feature branch: ` git checkout -b feature-name `
180
- 3 . Make your changes and test them
181
- 4 . Commit with clear messages: ` git commit -m "Add feature X" `
182
- 5 . Push to your fork: ` git push origin feature-name `
183
- 6 . Open a Pull Request
184
-
185
- ### Development Setup
186
-
187
- ``` bash
188
- # Install development dependencies
189
- pip install -r requirements.txt
190
-
191
- # Run with auto-reload
192
- uvicorn app:app --host 0.0.0.0 --port 8000 --reload
193
- ```
194
-
195
- ## 🧪 Testing
196
-
197
- Test with example repositories:
198
-
199
- - ** Simple Python app** : ` https://github.com/cyclotruc/gitingest `
200
- - ** This project** : ` https://github.com/cyclotruc/gitcontainer `
201
- - ** Complex Node.js app** : Any Express.js repository
202
- - ** Multi-service app** : Repositories with multiple services
203
-
204
129
## 🎨 Customization
205
130
206
131
### Adding Custom Instructions
@@ -212,46 +137,6 @@ Use the "Additional instructions" feature to customize generation:
212
137
- ` "Optimize for production deployment" `
213
138
- ` "Add development tools for debugging" `
214
139
215
- ### Extending Technology Support
216
-
217
- Add new technology detection in ` tools/create_container.py ` :
218
-
219
- ``` python
220
- # Add your technology patterns to the AI prompt
221
- technology_patterns = {
222
- " rust" : [" Cargo.toml" , " src/main.rs" ],
223
- " ruby" : [" Gemfile" , " app.rb" , " config.ru" ],
224
- # Add more...
225
- }
226
- ```
227
-
228
- ## 🐛 Troubleshooting
229
-
230
- ### Common Issues
231
-
232
- ** "OPENAI_API_KEY not found"**
233
- - Ensure your ` .env ` file contains the API key
234
- - Check that the environment variable is properly set
235
-
236
- ** "Failed to clone repository"**
237
- - Verify the GitHub URL is correct and public
238
- - Check your internet connection
239
- - Ensure Git is installed on your system
240
-
241
- ** "Generation timeout"**
242
- - Large repositories may take longer to process
243
- - Check your OpenAI API quota and limits
244
-
245
- ** Monaco Editor not loading**
246
- - Ensure you have internet connection for CDN resources
247
- - Check browser console for JavaScript errors
248
-
249
- ### Performance Tips
250
-
251
- - ** Large repositories** : Consider adding ` .gitignore ` patterns to exclude large files
252
- - ** Private repositories** : Currently only public GitHub repositories are supported
253
- - ** API limits** : Monitor your OpenAI API usage to avoid rate limits
254
-
255
140
## 📝 License
256
141
257
142
This project is licensed under the MIT License - see the [ LICENSE] ( LICENSE ) file for details.
0 commit comments