tighten / takeout

Docker-based development-only dependency manager. macOS, Linux, and WSL2-only and installs via PHP's Composer... for now.
MIT License
1.59k stars 83 forks source link

Getting: Docker is not available error #315

Closed lesaff closed 5 months ago

lesaff commented 1 year ago

I keep getting "Docker is not available" error when I run takeout enable. See screenshots and info below:

Thanks!

Takeout Version: 2.4.0
Device: Apple Macbook Air M2
OS: Ventura 13.3
Docker Version: 23.0.1, build a5ee5b1dfc
Docker Desktop Version: 4.17.0 (99724)
Docker Engine: 20.10.23
Kubernetes: 1.25.4
Compose: 2.15.1
CleanShot 2023-04-03 at 07 49 26@2x CleanShot 2023-04-03 at 07 50 21@2x
tonysm commented 1 year ago

Hey @lesaff 👋🏼

Can you tell me more about your setup? How did you install PHP? How did you install Takeout?

When you this command docker info, does it work for you (that's the command Takeout uses to check if Docker is available)?

lesaff commented 1 year ago

PHP installed via brew. Takeout installed via composer. I wonder if it has something to do with me using Colima?


$ docker info
Client: Docker Engine - Community
 Version:    24.0.2
 Context:    colima
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.10.4
    Path:     /Users/rudy/.docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.17.3
    Path:     /Users/rudy/.docker/cli-plugins/docker-compose
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.0
    Path:     /Users/rudy/.docker/cli-plugins/docker-dev
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.19
    Path:     /Users/rudy/.docker/cli-plugins/docker-extension
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v0.1.0-beta.4
    Path:     /Users/rudy/.docker/cli-plugins/docker-init
  sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
    Version:  0.6.0
    Path:     /Users/rudy/.docker/cli-plugins/docker-sbom
  scan: Docker Scan (Docker Inc.)
    Version:  v0.26.0
    Path:     /Users/rudy/.docker/cli-plugins/docker-scan
  scout: Command line tool for Docker Scout (Docker Inc.)
    Version:  v0.10.0
    Path:     /Users/rudy/.docker/cli-plugins/docker-scout

Server:
ERROR: Cannot connect to the Docker daemon at unix:///Users/rudy/.colima/default/docker.sock. Is the docker daemon running?
errors pretty printing info```
tonysm commented 1 year ago

Hmm, that's probably the reason. If docker info doesn't run successfully (I see there's an error, so probably the exit code is an error), Takeout will not handle that correctly. Is there a docker info replacement when using Colima?

tonysm commented 5 months ago

Closing this. Let me know if there's a docker info replacement for Colima. Right now, we're leaning on that command to return a non-zero exit code.