Skip to content

[Bug]: Docs state docker context aware, but does not seem to work #815

@rcrowe

Description

@rcrowe

Testcontainers version

v0.17.0

Using the latest Testcontainers version?

Yes

Host OS

OSX

Host arch

Arm64

Go version

1.19

Docker version

> docker version

Client: Docker Engine - Community
 Version:           23.0.0
 API version:       1.41 (downgraded from 1.42)
 Go version:        go1.19.5
 Git commit:        e92dd87c32
 Built:             Tue Jan 31 16:45:07 2023
 OS/Arch:           darwin/arm64
 Context:           colima

Server:
 Engine:
  Version:          20.10.20
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.18.7
  Git commit:       03df974ae9e6c219862907efdd76ec2e77ec930b
  Built:            Wed Oct 19 02:58:31 2022
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          v1.6.8
  GitCommit:        9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6
 runc:
  Version:          1.1.4
  GitCommit:        5fd4c4d144137e991c4acebb2146ab1483a97925
 docker-init:
  Version:          0.19.0
  GitCommit:
> colima version

colima version 0.5.2
git commit: 6b5b6fe0540e708f0c9d6e8919fab292c671fc72

runtime: docker
arch: aarch64
client: v23.0.0
server: v20.10.20

Docker info

> docker info

Client:
 Context:    colima
 Debug Mode: false

Server:
 Containers: 115
  Running: 0
  Paused: 0
  Stopped: 115
 Images: 5
 Server Version: 20.10.20
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc io.containerd.runc.v2 io.containerd.runtime.v1.linux
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6
 runc version: 5fd4c4d144137e991c4acebb2146ab1483a97925
 init version:
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 5.15.82-0-virt
 Operating System: Alpine Linux v3.16
 OSType: linux
 Architecture: aarch64
 CPUs: 2
 Total Memory: 1.93GiB
 Name: colima
 ID: VGCS:DVBU:ZQ3G:A75O:BZ5P:UNB7:7NJH:537I:2B7V:A2J5:KW4J:VH5A
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

What happened?

Starting a container via testcontainers returns the following error:

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?: failed to create container

Relevant log output

No response

Additional information

states the following:

As of Colima v0.4.0 it's recommended to set the active Docker context to use
Colima. After the context is set _Testcontainers for Go_ will automatically be
configured to use Colima.

The context is set correctly...

# docker context show
colima

I can work work around that, but based on the docs assumed this was supposed to work.

If testcontainers is not context aware, I guess this is a feature request & not a bug report 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationDocs, docs, docs.hacktoberfestPull Requests accepted for Hacktoberfest.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions