Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 of 3 tasks
iFanze opened this issue Jan 20, 2023 · 1 comment
Open
1 of 3 tasks

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

iFanze opened this issue Jan 20, 2023 · 1 comment

Comments

@iFanze
Copy link

iFanze commented Jan 20, 2023

  • 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. ...
@StefanScherer StefanScherer transferred this issue from docker/for-mac Jan 25, 2023
@StefanScherer
Copy link
Member

Thanks for the report. Dev Environments is still a beta feature with some rough edges here and there. This is good feedback and we'll discuss in the team how to improve these local folders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants