Fix Devcontainer build errors (#4647)

Devcontainer Dockerfile has been updated to use Ubuntu 24.04 as the
base. Now devcontainer builds without errors. Tested with Podman on
Linux and Docker Desktop on Windows.

To avoid re-downloading and re-compiling whenever the container is
deleted, a named volume is mounted at /home/ubuntu/.cache.

Closes #4065
This commit is contained in:
Nirmal Patel
2024-12-17 23:38:17 +00:00
committed by GitHub
parent 2eb1c7c372
commit b69f97d1f3
5 changed files with 37 additions and 18 deletions
+15 -1
View File
@@ -5,8 +5,22 @@
{
"name": "carbon-lang",
"build": {
"dockerfile": "../docker/ubuntu2204/base/Dockerfile"
"dockerfile": "../docker/ubuntu2404/base/Dockerfile"
},
"mounts": [
{
"source": "carbon-cache",
"target": "/home/ubuntu/.cache",
"type": "volume"
}
],
"containerUser": "ubuntu",
"remoteUser": "ubuntu",
// When using devcontainer with podman, you may see /workspace being owned
// by root. To work around this, uncomment the following lines
// "runArgs": [
// "--userns=keep-id"
// ],
"customizations": {
"vscode": {
"extensions": [