-
Notifications
You must be signed in to change notification settings - Fork 60
Description
I tried to define a dev container setup with vscode for development. The purpose is to define a template to use uv to develop python projects (source code layout) within a devcontainer with vs code alongside without using vs code. Therefore I want to define a dev container setup with a Docker.debug, docker-compose.yml and devcontainer.json file.
Issue:
The "new (in the container)" create .venv to reflect the container os does neither exists in the defined (standard) root folder of the project when creating it in the config of the devcontainer.json via the "postCreateCommand": {"uv-sync--frozen--no-install-project": "uv sync --frozen --no-install-project"} nor when using the terminal within the running container uv sync --frozen --no-install-project. The .venv file is excluded during build by using .dockerignore. The mount should enable volume bind for the project code on the one side and a separate mount of the container .venv should persist the .venv within the container.
Find the setup in the git repo:
https://github.com/tiefenthaler/dev-container-uv-datascience/tree/venv-mount-issue
FYI: The repo also contains the use of docker for production, which all works perfekt.
Would be great for any information how to solve this issue.