Skip to content

Commit d4c7c71

Browse files
jsbattigclaude
andcommitted
Fix Docker Compose version field warning for Ubuntu compatibility
PROBLEM: Ubuntu users see "the attribute version is obsolete" warning because Docker Compose v2+ deprecates the version field. SOLUTION: ✅ Remove "version": "3.8" from all Docker Compose configurations ✅ Update test to expect no version field (Docker Compose v2+ standard) ✅ Maintains full compatibility with both Docker Compose v1 and v2+ RESULT: No more Docker Compose version warnings on modern systems. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent d81b56a commit d4c7c71

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/code_indexer/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
to provide intelligent code search capabilities.
66
"""
77

8-
__version__ = "0.0.7.0"
8+
__version__ = "0.0.8.0"
99
__author__ = "Code Indexer Team"

src/code_indexer/services/docker_manager.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,6 @@ def create_compose_file(self, data_dir: Path = Path(".code-indexer")) -> None:
238238
qdrant_dockerfile = self._find_dockerfile("Dockerfile.qdrant")
239239

240240
compose_config = {
241-
"version": "3.8",
242241
"services": {
243242
"ollama": {
244243
"build": {
@@ -733,7 +732,6 @@ def generate_compose_config(
733732
# current_project_dir = Path.cwd() # Currently unused but may be needed for future features
734733

735734
compose_config = {
736-
"version": "3.8",
737735
"services": {
738736
"ollama": {
739737
"build": {

tests/test_docker_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ def test_compose_config_generation(self):
126126

127127
config = docker_manager.generate_compose_config()
128128

129-
# Check basic structure
130-
self.assertIn("version", config)
129+
# Check basic structure (version field is deprecated in Docker Compose v2+)
131130
self.assertIn("services", config)
132131
self.assertIn("networks", config)
132+
self.assertNotIn("version", config) # Should not have version field
133133

134134
# Check services
135135
services = config["services"]

0 commit comments

Comments
 (0)