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

Incorrect workspace copy, causing host/container repo sync issue #2

Open
shreyansp opened this issue Aug 14, 2022 · 1 comment
Open

Comments

@shreyansp
Copy link

shreyansp commented Aug 14, 2022

Thanks for sharing this example. There is one mistake in it though. It took me a couple hours to figure out, using this example, why my git repo in devcontainer was not in sync with that on my host. It's because of your last line COPY . /workspace.

The whole point of dev containers is that so the workspace from your host and container is shared (by mounting it), not copied!

The dev container docker image that Microsoft provides, mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}, creates a mount correctly, but then I guess your COPY command overwrites this and creates a static snapshot view of the repository from the host at the point in time when the image is created.

Removing this line fixes everything. Thank you!

@louis70109
Copy link
Owner

@shreyansp Thanks for feedback. This Dockerfile just refer to video :P

Could you please send a PR to fix it ~~ 👍

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