jesseduffield / jesseduffield/lazydocker

Multiple projects with the same service names does not work

Open
#833 2 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Go
Stars
52.8k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
Lazydocker does not support "clones" of the same docker compose project, or any case where two projects share a service name.

**To Reproduce**
Steps to reproduce the behavior:
Make `docker1` and `docker2` directories, each with this `compose.yaml`:
```
services:
sleep:
image: ubuntu:latest
entrypoint: ["/bin/sh", "-c"]
command: ["echo 'Sleeping...' && sleep 100000"]
stop_grace_period: 0s
```

Run `docker compose create` in each. Now run lazydocker in each. One of them will detect the other as the project and will not be able to manage the one in the current directory. Using an explicit -p does not fix this.

**Expected behaviour**
Both instances manage their own local project regardless of the service name.

**Desktop (please complete the following information):**
- OS: Ubuntu
- Lazydocker Version 0.25.2

**Additional context**
This was seemingly introduced in https://github.com/jesseduffield/lazydocker/pull/774

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the two docker1 and docker2 directories and the compose.yaml shown in the report. Then trace the project and service discovery behavior associated with PR #774. Done means two lazydocker instances each manage the project in their own current directory, even when service names and compose project names overlap.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, go
Domain
cli, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.