Skip to content

Commit 0557b36

Browse files
Update devcontainer config, to remove /etc/os-release mount (#54897)
<!--Please give us some feedback on your experience writing this PR ! https://app.datadoghq.com/forms/43db4c02-6837-400c-8083-692e141b1b88 !--> ### What does this PR do? Remove /etc/os-release mount that breaks some dpkg interactions, like in `sudo unminimize`. Also move `HOST_*` env variables so that they are propagated correctly to the ssh connection ### Motivation ### Describe how you validated your changes ### Additional Notes Co-authored-by: nicolas.schweitzer <nicolas.schweitzer@datadoghq.com>
1 parent bcbf486 commit 0557b36

3 files changed

Lines changed: 5 additions & 9 deletions

File tree

.devcontainer/datadog/default/devcontainer.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
"-v",
2020
"/:/host/root:ro",
2121
"-v",
22-
"/sys/kernel/debug:/sys/kernel/debug",
23-
"-v",
24-
"/etc/os-release:/etc/os-release"
22+
"/sys/kernel/debug:/sys/kernel/debug"
2523
]
2624
}

.devcontainer/datadog/default/features/datadog-agent/install.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,7 @@ cp /var/config/dd/dd-agent-workspace-env.sh /etc/profile.d/50-agent-workspace-en
2424
# /etc/zsh/zshenv sources these files.
2525
cat > /etc/profile.d/zz-ddagent-workspace-env.sh << 'EOF'
2626
export PATH="/home/bits/.local/bin:$PATH" # Make sure we keep it in the path some useful tooling is there
27+
export HOST_ROOT="/host/root"
28+
export HOST_PROC="/host/root/proc"
29+
export HOST_SYS="/host/root/sys"
2730
EOF

.devcontainer/datadog/default/prebuild-devcontainer.json

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,5 @@
2626
"IPC_LOCK",
2727
"CHOWN",
2828
"KILL"
29-
],
30-
"containerEnv": {
31-
"HOST_ROOT": "/host/root",
32-
"HOST_PROC": "/host/root/proc",
33-
"HOST_SYS": "/host/root/sys"
34-
}
29+
]
3530
}

0 commit comments

Comments
 (0)