Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Down command #386

Open
IgnisDa opened this issue Jan 28, 2023 · 12 comments
Open

Down command #386

IgnisDa opened this issue Jan 28, 2023 · 12 comments
Labels
feature-request New feature or request gathering-community-feedback This issue is on hold while we gather input, votes, and feedback from the community.

Comments

@IgnisDa
Copy link

IgnisDa commented Jan 28, 2023

Hello! Is there any ETA for adding the down and stop subcommands? It becomes very tedious to stop the containers manually.

@yokonao
Copy link
Contributor

yokonao commented May 10, 2023

@chrmarti

Hello! Thank you for all your hard work. I believe that the feature I am thinking of would greatly benefit CLI users.

I was wondering if your project is open to pull request submissions? If so, I would love to implement this feature as my contribution to the amazing work you have done. My team and I have greatly benefited from the devcontainer OSS and I would like to reciprocate by contributing to the project.

@chrmarti
Copy link
Contributor

Hi @yokonao, thanks! Happy to learn the CLI is useful to you. We are indeed open to pull requests. Thank you.

@alexanderilyin
Copy link

Workaround while we wait for devcontainer down to be released:

@timnolte
Copy link

I don't understand why the README in this repo lists the stop & down commands when they don't actually exist yet.

@IgnisDa
Copy link
Author

IgnisDa commented Sep 17, 2023

They are not checked in the readme, so I don't think it is misleading.

@timnolte
Copy link

@IgnisDa ah, I totally didn't even see the checkboxes, might be related to the GitHub dark theme making them harder to see. Still seems like there isn't much value in having it the README. 🤷🏼‍♂️

@GaTechThomas
Copy link

Here's the checkbox contrast issue mentioned above. I just spent a lot of time thinking that I was on an old version of the CLI because this appeared to show a list that was fully complete (or fully incomplete).

image

@timnolte
Copy link

For others looking for this feature, I've actually stopped using this CLI in favor of using the DevPod CLI, which actually has a stop and delete command implemented.

The only catch with using the DevPod CLI/ap is that it implements SSH as the means for getting into the running Dev Container. There is also a desktop UI/app if desired.

I find it way more feature complete and flexible than this CLI. Additionally, the DevPod CLI doesn't require a local NodeJS installed to use.

https://devpod.sh/

@geofflambeth
Copy link

Thanks for this recommendation @timnolte! Have you found devpod implements the spec closely enough that users could swap between devpod/vscode/other implementations easily enough?

@timnolte
Copy link

@geofflambeth yes, as far as I've tested I haven't seen any issues with using the same devcontainer.json. We are currently using Dev Containers at the agency I work at and most of Devs are using VScode and I use the DevPod CLI since I use Neovim as my IDE.

@samruddhikhandale samruddhikhandale added the gathering-community-feedback This issue is on hold while we gather input, votes, and feedback from the community. label Sep 23, 2024
@bamurtaugh
Copy link
Member

Thanks all for the discussion! We'd absolutely welcome a PR to contribute these commands. Additionally, our understanding is DevPod leverages our specification (https://containers.dev/supporting#devpod), so if anyone from / working with DevPod would be similarly interested in contributing down and stop here, that'd be fantastic!

@ruffsl
Copy link

ruffsl commented Oct 4, 2024

Guessing the mechanism for tracking a matching devcontainer exists to some degree given remove-existing-container

'remove-existing-container': { type: 'boolean', default: false, description: 'Removes the dev container if it already exists.' },

export async function findExistingContainer(params: DockerResolverParameters, labels: string[]) {
const { common } = params;
let container = await findDevContainer(params, labels);
if (params.expectExistingContainer && !container) {
throw new ContainerError({ description: 'The expected container does not exist.' });
}
if (container && (params.removeOnStartup === true || params.removeOnStartup === container.Id)) {
const text = 'Removing Existing Container';
const start = common.output.start(text);
await removeContainer(params, container.Id);
common.output.stop(text, start);
container = undefined;
}
return container;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request gathering-community-feedback This issue is on hold while we gather input, votes, and feedback from the community.
Projects
None yet
Development

No branches or pull requests

10 participants