slim icon indicating copy to clipboard operation
slim copied to clipboard

[Bug]Slimtoolkit doesn't recognised docker engine comes buddled up with Docker Desktop

Open atharvashirdhankar opened this issue 3 years ago • 10 comments

Expected Behavior

The slimtoolkit should connect with docker desktop and docker engine but it didn't!


Actual Behavior

I've installed Docker Desktop which comes bundled up with Docker Engine and then installed slimtoolkit but I think slimtoolkit didn't able to find docker engine which comes with Docker desktop. So It only connects with docker when we install docker engine and other docker peripherals when we install it seprately.


Steps to Reproduce the Problem

1. 1. 1.


Specifications

  • Version: Slimtoolkit version 1.40.1
  • Platform: Ubuntu Linux 22.04 LTS

atharvashirdhankar avatar May 12 '23 19:05 atharvashirdhankar

Thanks for sharing your problem @StarTrooper08 ! This might be linux desktop related. Not a problem with the Mac Docker Desktop. slim does need /var/run/docker.sock, which is the traditional docker socket path, but it's possible that it's not created in your Docker Desktop installation. According to https://github.com/docker/desktop-linux/issues/20 there's a linux Docker Desktop option for it: Settings -> Advanced -> check the option Enable default Docker socket (Requires password). Let me know if this does the trick for you.

kcq avatar May 14 '23 03:05 kcq

I didn't find any configuration to set up slimtoolkit with docker desktop. But no issue it's working fine with Docker CLI and using slimtoolkit container with docker desktop.

I think we can close this issue.

atharvashirdhankar avatar May 24 '23 13:05 atharvashirdhankar

@StarTrooper08 adding the Docker Desktop notes to the README

kcq avatar May 24 '23 15:05 kcq

here's the info: https://github.com/slimtoolkit/slim#docker-desktop

kcq avatar May 24 '23 15:05 kcq

There's a small enhancement that can go along with the new Docker Desktop readme notes (to try ~/.docker/run/docker.sock if /var/run/docker.sock is not there. Once it's added this ticket can be closed.

kcq avatar May 26 '23 01:05 kcq

the enhancement will be available in the next release (already in master)

kcq avatar Jun 10 '23 19:06 kcq

I have similar issue but with OrbStack on Mac with ARM CPU

❯ mint xray nginx:latest
cmd=xray state=started
cmd=xray info=cmd.input.params runtime='auto/docker' target='nginx:latest' add-image-manifest='false' add-image-config='false' rm-file-artifacts='false' 
time="2025-09-26T15:48:39+02:00" level=error msg="image.inspector.NoImage: err=cannot connect to Docker endpoint"
time="2025-09-26T15:48:39+02:00" level=fatal msg="slim: failure" error="cannot connect to Docker endpoint" stack="goroutine 1 [running]:\nruntime/debug.Stack()\n\truntime/debug/stack.go:26 +0x64\ngithub.com/mintoolkit/mint/pkg/util/errutil.FailOn({0x1071898b8, 0x10877ab40})\n\tgithub.com/mintoolkit/mint/pkg/util/errutil/errutil.go:32 +0x38\ngithub.com/mintoolkit/mint/pkg/app/master/command/xray.OnCommand(0x14000735920, 0x1400063e1e0, 0x14000735408, {0x16b897532, 0xc}, 0x1, {0x0, 0x0}, {0x0, 0x0}, ...)\n\tgithub.com/mintoolkit/mint/pkg/app/master/command/xray/handler.go:250 +0x149c\ngithub.com/mintoolkit/mint/pkg/app/master/command/xray.init.func1(0x140005ef500)\n\tgithub.com/mintoolkit/mint/pkg/app/master/command/xray/cli.go:343 +0x1868\ngithub.com/urfave/cli/v2.(*Command).Run(0x1087bcb60, 0x140005ef500, {0x1400067a780, 0x2, 0x2})\n\tgithub.com/urfave/cli/[email protected]/command.go:279 +0x5f0\ngithub.com/urfave/cli/v2.(*Command).Run(0x1400067e840, 0x140005eef40, {0x14000198690, 0x3, 0x3})\n\tgithub.com/urfave/cli/[email protected]/command.go:272 +0x828\ngithub.com/urfave/cli/v2.(*App).RunContext(0x140002b1000, {0x1071b4ec8, 0x108a195a8}, {0x14000198690, 0x3, 0x3})\n\tgithub.com/urfave/cli/[email protected]/app.go:337 +0x514\ngithub.com/urfave/cli/v2.(*App).Run(...)\n\tgithub.com/urfave/cli/[email protected]/app.go:311\ngithub.com/mintoolkit/mint/pkg/app/master.Run()\n\tgithub.com/mintoolkit/mint/pkg/app/master/app.go:15 +0x4c\nmain.main()\n\tgithub.com/mintoolkit/mint/cmd/mint/main.go:15 +0x194\n" version="darwin/arm64|Aurora|1.41.7|latest|latest"
❯ docker info  
Client:
 Version:    28.3.3
 Context:    orbstack
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.26.1
    Path:     /Users/denis/.docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.39.2
    Path:     /Users/denis/.docker/cli-plugins/docker-compose

Server:
 Containers: 3
  Running: 0
  Paused: 0
  Stopped: 3
 Images: 67
 Server Version: 28.3.3
 Storage Driver: overlay2
  Backing Filesystem: btrfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 CDI spec directories:
  /etc/cdi
  /var/run/cdi
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 75cb2b7193e4e490e9fbdc236c0e811ccaba3376
 runc version: 4ca628d1d4c974f92d24daccb901aa078aad748e
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.15.11-orbstack-00539-g9885ebd8e3f4
 Operating System: OrbStack
 OSType: linux
 Architecture: aarch64
 CPUs: 11
 Total Memory: 8.779GiB
 Name: orbstack
 ID: c8c3d4ec-06b5-49b3-88b8-9d2207f0b55a
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  ::1/128
  127.0.0.0/8
 Live Restore Enabled: false
 Product License: Community Engine
 Default Address Pools:
   Base: 192.168.97.0/24, Size: 24
   Base: 192.168.107.0/24, Size: 24
   Base: 192.168.117.0/24, Size: 24
   Base: 192.168.147.0/24, Size: 24
   Base: 192.168.148.0/24, Size: 24
   Base: 192.168.155.0/24, Size: 24
   Base: 192.168.156.0/24, Size: 24
   Base: 192.168.158.0/24, Size: 24
   Base: 192.168.163.0/24, Size: 24
   Base: 192.168.164.0/24, Size: 24
   Base: 192.168.165.0/24, Size: 24
   Base: 192.168.166.0/24, Size: 24
   Base: 192.168.167.0/24, Size: 24
   Base: 192.168.171.0/24, Size: 24
   Base: 192.168.172.0/24, Size: 24
   Base: 192.168.181.0/24, Size: 24
   Base: 192.168.183.0/24, Size: 24
   Base: 192.168.186.0/24, Size: 24
   Base: 192.168.207.0/24, Size: 24
   Base: 192.168.214.0/24, Size: 24
   Base: 192.168.215.0/24, Size: 24
   Base: 192.168.216.0/24, Size: 24
   Base: 192.168.223.0/24, Size: 24
   Base: 192.168.227.0/24, Size: 24
   Base: 192.168.228.0/24, Size: 24
   Base: 192.168.229.0/24, Size: 24
   Base: 192.168.237.0/24, Size: 24
   Base: 192.168.239.0/24, Size: 24
   Base: 192.168.242.0/24, Size: 24
   Base: 192.168.247.0/24, Size: 24
   Base: fd07:b51a:cc66:d000::/56, Size: 64

WARNING: DOCKER_INSECURE_NO_IPTABLES_RAW is set
❯ ls -l /var/run/docker.sock                
lrwxr-xr-x@ 1 root  daemon  38 Sep 22 19:31 /var/run/docker.sock -> /Users/denis/.orbstack/run/docker.sock

DenisBY avatar Sep 26 '25 13:09 DenisBY

Never mind. The solution:

slim --host /Users/denis/.orbstack/run/docker.sock xray ...

To avoid writing this every time:

alias slim="slim --host /Users/denis/.orbstack/run/docker.sock"

DenisBY avatar Sep 26 '25 14:09 DenisBY

@DenisBY yes, that's one way to do it by using a custom --host flag to point to the OrbStack's Docker socket. Another option to consider is the --crt-context, which is like Docker's --context flag where it can look like this: --crt-context=orbstack

kcq avatar Sep 28 '25 02:09 kcq

This issue is pretty much resolved and the --host flag is a good backup along with the --crt-context flag if the container runtime you use configures Docker context (like OrbStack does. LIMA and COLIMA do this too).

kcq avatar Sep 28 '25 02:09 kcq