-
Notifications
You must be signed in to change notification settings - Fork 4
deploy local: Docker check should abort when Docker is unavailableΒ #69
Copy link
Copy link
Closed
Description
Problem
gh devlake deploy local checks Docker availability and prints a warning when Docker Desktop isn't running, but then proceeds to call docker compose up anyway. This produces a confusing low-level pipe error:
π³ Checking Docker...
β οΈ Docker not found or not running
Install Docker Desktop: https://docs.docker.com/get-docker
π³ Building and starting containers in C:\Users\eldrickt\devlake-local...
(Building from source β this may take a few minutes on first run)
Error: docker compose up failed: exit status 1
...
open //./pipe/dockerDesktopLinuxEngine: The system cannot find the file specified.
The Docker check at cmd/deploy_local.go:173-179 is a non-blocking warning β it never gates the startLocalContainers() call that follows.
Additionally, internal/docker/build.go defines a CheckAvailable() helper that is never called anywhere.
Proposed Solution
- Abort early when Docker is not available β return a clear error instead of continuing to
docker compose up. - Use
docker.CheckAvailable()frominternal/docker/build.goinstead of the inline check β DRY up the duplicate logic. - Improve the error message β tell the user exactly what to do (start Docker Desktop, then re-run) rather than dumping raw
docker composeoutput.
Expected behavior after fix:
π³ Checking Docker...
β Docker not found or not running
Install Docker Desktop: https://docs.docker.com/get-docker
Start Docker Desktop, then re-run: gh devlake deploy local
(command exits with non-zero status, no docker compose up attempt)
Scope of Changes
cmd/deploy_local.goβ replace inline Docker check withdocker.CheckAvailable()call; return error on failure instead of printingβ οΈ and continuing.internal/docker/build.goβ no changes needed (helper already exists).
Acceptance Criteria
- When Docker is not running,
deploy localaborts immediately after the check with a clear error message - No
docker compose upattempt is made when Docker is unavailable -
docker.CheckAvailable()is used instead of inlineexec.Commandcheck -
go build ./...,go test ./...,go vet ./...all pass
Reactions are currently unavailable
Metadata
Metadata
Labels
bugSomething isn't workingSomething isn't working