How do I terminate a running dev container? #139
-
The CLI includes a Seems like there should be a |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi 👋 The dev container CLI is currently in active development, and it consists of the following commands mentioned in here. It mentions the In the meanwhile, you could clean up the dev container as follows -
|
Beta Was this translation helpful? Give feedback.
-
would it be possible to create a stop.sh script that incorperates this? perhaps an example would be great in the meantime untill those down and stop commands are in place? |
Beta Was this translation helpful? Give feedback.
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 @bamurtaughIn 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 containerdevcontainer exec --id-label ${id_label} --workspace-folder ../workspace bash -c '....'
--> Execute a command on a running dev containerdocker rm -f $(docker container ls -f "label=${id_label}" -q)
--> ❗ Remove dev container ❗