Linux Troubleshooting
Known issues and fixes on Linux.
Files owned by an unknown user after using a local folder
When you start a workspace from a local folder and devcontainer.json sets remoteUser or containerUser, Devsy changes the folder's ownership to that user so the container can write to it. On the host the owner then shows as an unknown user. After the workspace stops, restore it:
sudo chown -R $(id -un):$(id -gn) .Local folders suit early work. Once the devcontainer works, push it to a Git repository and use that instead.
Fish shell
Anything in config.fish runs on every fish -c call, which can interfere with devsy agent workspace up. Move your customizations inside the if status is-interactive block:
if status is-interactive
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
# customizations
endSELinux
With SELinux, a mounted volume can fail with "Permission denied" even when ownership is correct. Add :Z to the volume:
{
"workspaceMount": "",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"runArgs": [
"--volume=${localWorkspaceFolder}:/workspaces/${localWorkspaceFolderBasename}:Z"
]
}ENAMETOOLONG when opening a workspace in VS Code
Some distributions have a very long PATH, which makes the SSH connection string too long. Set the SSH binary explicitly in VS Code. See issue #1045.
Docker permission denied or daemon unreachable
If devsy workspace up fails with a permission error on docker.sock, add your user to the docker group and log in again:
sudo usermod -aG docker $USERIf the daemon is not running, start it:
sudo systemctl start dockerPodman
Rootless socket
Rootless Podman uses the socket $XDG_RUNTIME_DIR/podman/podman.sock. If Devsy cannot connect, start the user socket:
systemctl --user start podman.socketOr point Devsy at it:
devsy provider set podman --option PODMAN_HOST=unix:///run/user/$(id -u)/podman/podman.sockpodman compose
podman compose hands off to an external provider, either podman-compose or a standalone docker-compose. Install one:
sudo apt-get install -y podman-composeDevsy handles this itself when it starts a workspace. You only need it for scripts that run inside the workspace and call docker-compose.
BuildKit syntax
podman build uses buildah, so Dockerfiles with the # syntax=docker/dockerfile:1 line or RUN --mount fail. Remove the syntax line and avoid BuildKit mounts.
Volume permissions in rootless mode
Rootless Podman maps user IDs, so files created in the container can appear owned by nobody on the host. With SELinux, use :Z as above. Without it, fix ownership:
podman unshare chown -R $(id -u):$(id -g) /path/to/volume