why are the vscode devcontainer examples mounting local volumes as cached instead of delegated?

  docker, visual-studio-code, vscode-devcontainer

I am currently working on a devcontainer setup using a compose file. I am wondering why the examples shown in the docs use the :cached suffix instead of :delegated.

I was thinking that with such a devcontainer, one is basically inside the container when making changes to the volume. So delegated would be more reasonable.

Here is some more explanation about the difference of the two: How do I add :cached or :delegated into a docker-compose.yml volumes list?

  • Use cached: when the host performs changes, the container is in read only mode.
  • Use delegated: when docker container performs changes, host is in read only mode.
  • Use default: When both container and host actively and continuously perform changes on data.

Source: Docker Questions

LEAVE A COMMENT