cli
cli copied to clipboard
Option `--build-no-cache` appears to use cache
I am trying to understand how (and where) Devcontainers are cached by the CLI. When I make a change to devcontainer.json
, VSCode prompts me to rebuild the container. I'm trying to use the CLI to accomplish this same thing: running devcontainer up
, and reflecting new changes to devcontainer.json
.
Running the following command does not reflect new changes to devcontainer.json
, even when all Docker containers are stopped. The only way I can get the CLI to completely rebuild seems to be calling docker rm
on all stopped containers. Am I missing something?
devcontainer up \
--workspace-folder . \
--workspace-mount-consistency consistent \ # my naive attempt to get the CLI to notice recent changes to `devcontainer.json`
--build-no-cache # another naive attempt by me to rebuild recent changes to `devcontainer.json`
--remove-existing-container
will run a new docker build
that should pick up your changes.
That works! Thanks for your help. What is the difference between --build-no-cache
and --remove-existing-container
?
--build-no-cache
only applies when the image is built and that only happens when there is no container or --remove-existing-container
is given.