lazydocker icon indicating copy to clipboard operation
lazydocker copied to clipboard

Switching projects

Open dsc8x opened this issue 6 years ago • 12 comments

Hey, first of all: Awesome project, many thanks for that! ❤️

I have one question: Is it possible to switch projects? For me only the last project that I started using docker-compose is shown and I am unable to figure out how to switch to other running projects 🤔

CleanShot 2019-11-18 at 15 48 39

dsc8x avatar Nov 18 '19 14:11 dsc8x

I think it's showing this if docker compose shows information in your current dir.
So your current dir or one of it's parents might have a docker compose file that docker compose detects and lazy docker is showing that.

If that's not the case it might be that you have found a bug :)

mjarkk avatar Nov 18 '19 16:11 mjarkk

If I run those two commands:

docker-compose up -p cpm-mcr docker-compose up -p cpm-ms

Then lazydocker will only show me the containers created in the second project, which is exactly the cpm-ms scenario from the screenshot above.

The above example is pretty simplified, of course the different projects in real life have different env vars and configurations :)

dsc8x avatar Nov 20 '19 20:11 dsc8x

We're having this issue as well, when copying an existing docker-compose project as template for a new project, running lazydocker in that new project shows the original project images and containers.

wesselvdv avatar Jan 08 '20 11:01 wesselvdv

This is turning into a quite annoying issue, I currently have 2 folders that I cannot use at the same time due to Lazydocker not being able to differentiate between them. When running a container in the one folder, and moving to the other it'll briefly show the other folder its name, but then switch it to the former.

wesselvdv avatar Jan 14 '20 07:01 wesselvdv

Same here

saimonmoore avatar May 19 '20 09:05 saimonmoore

This seems to be caused by having running compose projects that have containers with exactly the same name. Seems the project prefix isn't taken into account.

wesselvdv avatar Oct 08 '20 08:10 wesselvdv

btw. seems this is a duplicate of #122

wesselvdv avatar Oct 08 '20 08:10 wesselvdv

Having the same issue

milushov avatar Jul 21 '23 18:07 milushov

We might need to rework how projects are handled or at least provide a way to change to recently opened projects

peauc avatar Jun 08 '24 14:06 peauc

Please fix this issue! I usually run multiple docker-compose-based projects on the same machine. I would be absolutely great if lazydocker could be "project-aware" just like docker-compose. Right now, while the "Project" does show the correct "COMPOSE_PROJECT_NAME", the monitored services are only limited to the last started project.

lamnguyenx avatar Aug 21 '24 02:08 lamnguyenx