Skip to content

Commit 89f799f

Browse files
committed
Use shared volume for devcontainer uv cache
Instead of mounting the user's local cache. For the first use this will be slower (if the user has previously used uv) but using a separate volume means links within the cache referring to devcontainer locations will not interfere with uv being run from outside the container. Using a named volume means devcontainers for multiple projects can share the same cache.
1 parent ae18808 commit 89f799f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@
5656
},
5757
// Keep a persistent cross container cache for uv
5858
{
59-
"source": "${localEnv:HOME}/.cache/uv",
59+
"source": "persistent-uv-cache",
6060
"target": "/root/.cache/uv",
61-
"type": "bind"
61+
"type": "volume"
6262
},
6363
// Use a volume mount for the uv venv so it is local to the container
6464
{

0 commit comments

Comments
 (0)