Ubuntu common feature breaks on rootless podman on WSL
(reporting here because this is where features are hosted) This was working until last week, I believe.
- VSCode Version: 1.68.1 (user setup)
- Local OS Version: Windows_NT x64 10.0.22000
- Local chip architecture: x86_64
- Reproduces in: Remote Containers
- Name of Dev Container Definition with Issue: Ubuntu common feature
Steps to Reproduce:
- Install WSL
- Set podman as the executable path instead of docker.
- Install Ubuntu (installed 22.04 from the Windows store GUI) and update it (
sudo apt-get update && sudo apt-get -y upgrade) - Mount root as shared (ignore the error/warning from tee):
$ sudo tee -a /etc/wsl.conf >&- <<EOF
#Necessary to quiet a podman warning
[boot]
command="mount --make-rshared /"
EOF
- Add necessary entries for XDG runtime directories:
$ cat << 'EOF' >> ~/.bashrc
if [[ -z "$XDG_RUNTIME_DIR" ]]; then
export XDG_RUNTIME_DIR=/run/user/$UID
if [[ ! -d "$XDG_RUNTIME_DIR" ]]; then
export XDG_RUNTIME_DIR=/tmp/$USER-runtime
if [[ ! -d "$XDG_RUNTIME_DIR" ]]; then
mkdir -m 0700 "$XDG_RUNTIME_DIR"
fi
fi
fi
EOF
-
Restart WSL; From a Windows command prompt:
wsl --shutdown -
Install podman:
sudo apt-get -y install podman -
Create user-specific config to allow podman to run as rootless;
-
mkdir -p ~/.config/containers -
cp /usr/share/containers/containers.conf ~/.config/containers/ -
sed -i 's|#cgroup_manager = "systemd"|cgroup_manager = "cgroupfs"|g' ~/.config/containers/containers.conf -
sed -i 's|#events_logger = "journald"|events_logger = "file"|g' ~/.config/containers/containers.conf -
sed -i 's|#\(log_driver = "k8s-file"\)|\1|g' ~/.config/containers/containers.conf
-
-
Create a temp repro and open in VSCode:
mkdir -p ~/repositories/repro && code ~/repositories/repro/ -
Add dev container config files as appropriate (see attached - there are some podman-specific settings for rootless/inside-container users required) repro.zip
-
Attempt to open in dev container, see logs. remoteContainers-2022-06-16T23-12-06.157Z.log
Note that it's just the use of it as a feature - downloading the script manually during dockerfile build works just fine. working.zip
cc @joshspicer for any thoughts as this seems to be feature related.