Skip to content

How do I terminate a running dev container? #139

Discussion options

You must be logged in to vote

Hi 👋

The dev container CLI is currently in active development, and it consists of the following commands mentioned in here. It mentions the devcontainer stop & devcontainer down commands. However, they haven't been implemented yet // cc @bamurtaugh

In the meanwhile, you could clean up the dev container as follows -

  • id_label="test-container=containerX"
  • devcontainer up --id-label ${id_label} --workspace-folder ../workspace --> Create & run dev container
  • devcontainer exec --id-label ${id_label} --workspace-folder ../workspace bash -c '....' --> Execute a command on a running dev container
  • docker rm -f $(docker container ls -f "label=${id_label}" -q) --> ❗ Remove dev container

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Chuxel
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants