Unhelpful error when initializing Dapr using a non-moby Docker context
Expected Behavior
When attempting to initialize Dapr using a non-moby Docker context, the user should get an error like "Dapr isn't supported in the current Docker context".
Actual Behavior
Dapr returns the following error:
⌛ Making the jump to hyperspace...
❌ unable to confirm whether dapr_zipkin is running or exists. error
unknown flag: --filter
The reason is that certain types of Docker contexts (e.g. ACI) support only a subset of the traditional Docker CLI arguments. In this case, ACI contexts do not support the --filter argument on the docker ps command (used by Dapr to determine whether its components are already running).
Note: ACI contexts are currently in beta, so perhaps it might eventually support
--filterand make this issue moot. Alternatively, Docker may improve the error message in this case to better describe the limitations of the current context (as it does when, say, executingdocker imagesin an ACI context.) Still, when the Docker commands are hidden from the user (as is the case here with Dapr) it may still be useful to recognize and trap certain kinds of errors in order to provide a better, more actionable, error.
One could argue this is just an "enhancement", in that I'm really looking for a better error message. However, I labeled it a "bug" as the
dapr initcommand exposes an implementation detail in this error case that's confusing to users who may not understand how Docker is being used under the covers.
Steps to Reproduce the Problem
- Install the latest Edge version (e.g. 2.3.6.1) of Docker.
- Create and switch to an ACI Docker context (see guide).
- Run
dapr init.
@yaron2 I think we might potentially need to wrap docker errors properly for the Dapr CLI. I think this should be prioritized for next milestone.
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged (pinned, good first issue, help wanted or triaged/resolved) or other activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as pinned, good first issue, help wanted or triaged/resolved. Thank you for your contributions.