Repository navigation
Description
Description
The devcontainer.json references docker-compose.local.yaml in the dockerComposeFile array, but this file does not exist in the workspace template. This causes:
- Image tests to fail: The test expects the file to exist at
/root/assets/workspace/.devcontainer/docker-compose.local.yaml - Integration tests to fail: Podman compose validation fails when trying to validate the devcontainer configuration because the referenced file is missing
Steps to Reproduce
-
Run
make test-image -
Observe failure in
TestFileStructure.test_assets_workspace_structure:
```
AssertionError: Expected file not found: /root/assets/workspace/.devcontainer/docker-compose.local.yaml
``` -
Run
make test-integration -
Observe multiple test failures with error:
```
missing files: ['/home/carlosvigo/Documents/vigOS/devcontainer/tests/tmp/workspace-devcontainer-*/.devcontainer/docker-compose.local.yaml']
Error: executing /usr/bin/podman-compose ... exit status 1
```
Expected Behavior
- Image tests should pass - the file should exist in the workspace template
- Integration tests should pass - podman compose should be able to validate the configuration
- The file should be created as an empty/commented template file (similar to
docker-compose.project.yaml) since it's meant for user-specific local overrides
Actual Behavior
- Image test fails because the expected file doesn't exist
- Integration tests fail because podman compose cannot validate a configuration referencing a missing file
- All 17 integration tests fail due to the devcontainer setup failure
Environment
- OS: Linux 6.14.0-37-generic (Ubuntu)
- Container Runtime: Podman 4.9.3, podman-compose 1.0.6
- Image Version/Tag: dev
- Architecture: AMD64
- Dev Containers CLI: @devcontainers/cli 0.80.1
Additional Context
Test Output:
```
make test-image:
FAILED tests/test_image.py::TestFileStructure::test_assets_workspace_structure
AssertionError: Expected file not found: /root/assets/workspace/.devcontainer/docker-compose.local.yaml
make test-integration:
ERROR tests/test_integration.py::TestPodmanSocketAccess::test_simple_image_build
Failed: devcontainer up failed
missing files: ['.../docker-compose.local.yaml']
Error: executing /usr/bin/podman-compose ... exit status 1
37 passed, 4 skipped, 17 errors in 12.43s
```
Current State:
docker-compose.project.yamlexists in the template (for team-shared config)docker-compose.local.yamlis referenced indevcontainer.jsonbut doesn't exist- The file is intended to be gitignored (user-specific, not shared)
- Docker Compose requires all files in
dockerComposeFilearray to exist, even if empty
Related Files:
assets/workspace/.devcontainer/devcontainer.json- references the missing fileassets/workspace/.devcontainer/docker-compose.project.yaml- example of similar filetests/test_image.py:277- test expects the file to existassets/workspace/.devcontainer/.gitignore- should ignoredocker-compose.local.yaml
Possible Solution
-
Create an empty template file
assets/workspace/.devcontainer/docker-compose.local.yamlwith:- Comments explaining it's for user-specific local overrides
- Instructions that it's gitignored
- Similar structure to
docker-compose.project.yamlbut for local use
-
Ensure
.gitignoreexcludes it (already done, but verify):- The file should be in
.gitignoreso users can create their own local overrides
- The file should be in
-
Update
init-workspace.sh(if needed):- Ensure the file is copied/created during workspace initialization
- Or create it if missing during initialization
-
Alternative approach (if docker-compose supports optional files):
- Make the file optional in
devcontainer.jsonif the devcontainers spec supports it - However, this may not be supported by docker-compose itself
- Make the file optional in
Recommended approach: Create an empty template file with helpful comments, similar to docker-compose.project.yaml, so docker-compose validation succeeds while still allowing users to customize it locally.
Activity
fix: track docker-compose.local.yaml in assets template
fix: add minimal structure to docker-compose.local.yaml to use empty …