-
Notifications
You must be signed in to change notification settings - Fork 386
devcontainer exec: no error message when Docker is not running on macOS #1187
Description
Problem
When running devcontainer exec command on macOS without Docker Desktop installed or running, the command exits with a non-zero exit code, but no error message is displayed on stderr. This forces developers to guess what went wrong.
Expected Behavior
The application should display a clear error message on stderr explaining that Docker cannot be reached, similar to what the docker CLI does.
Current Behavior
$ devcontainer exec poetry --version
# No output, just exits with code 1Example of Good Error Messaging
The docker CLI provides helpful feedback:
$ docker ps
Cannot connect to the Docker daemon at unix:///Users/kamil/.docker/run/docker.sock. Is the docker daemon running?Impact
Poor error messaging negatively affects developer experience (DX). Users can't quickly diagnose issues and must resort to debugging or searching through documentation.
Suggested Solution
When devcontainer exec fails to connect to Docker, it should print a descriptive error message to stderr, similar to:
Error: Cannot connect to Docker daemon. Is Docker Desktop running?
This would significantly improve the user experience and reduce confusion.