Skip to content
This repository was archived by the owner on May 27, 2025. It is now read-only.
This repository was archived by the owner on May 27, 2025. It is now read-only.

The directory (~/.docker/devenvironments) confuse me. #138

Open
@iFanze

Description

@iFanze
  • I have tried with the latest version of Docker Desktop
  • I have tried disabling enabled experimental features
  • I have uploaded Diagnostics
  • Diagnostics ID:

Expected behavior

When creating a new docker dev environment, I can choose one of the sources:

  • Exsiting Git repo (using Volume)
  • Local directory (using Bind-Mount)

Either of them will create a folder under ~/.docker/devenvironments, with a file devenv.log.

When I select Local directory, it works as expected: default compose-dev.yaml file was created under my directory. I can connect to the container in vscode, and edit the file to change the image to my customized image. After deleting and restarting the container, it takes effect.

However, when I choose "Exsiting Git repo", it behaves different out of my expectation. I cannot change the image this way (edit the file in vscode).

Actual behavior

From my observation, to modify compose-dev.yaml file in the volume by vscode has no effect. But it's useful if I modify ~/.docker/devenvironments/[devenv-name]/repository/compose-dev.yaml file in macOS.

My question:

  • Why is there ~/.docker/devenvironments/[devenv-name]/repository directory? This copy seems to be useless because the git repository will be cloned to the docker volume as well (which can be accessed by vscode).
  • On the contrary, why ~/.docker/devenvironments/[devenv-name]/repository/compose-dev.yaml take effect but not the file under the docker volume? It's very obscure and inconvenient. So what is the best way to modify the compose-dev.yaml file?

Information

  • macOS Version: 13.1 (22C65)
  • Intel chip or Apple chip: M1 Pro
  • Docker Desktop Version: 4.16.2 (95914)

Output of /Applications/Docker.app/Contents/MacOS/com.docker.diagnose check

Steps to reproduce the behavior

  1. ...
  2. ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions