Skip to content

[Bug]: Cannot locate specified Dockerfile: Dockerfile, will retry  #2203

@danvergara

Description

@danvergara

Testcontainers version

0.27.0

Using the latest Testcontainers version?

Yes

Host OS

Debian

Host arch

x86

Go version

1.21.6

Docker version

Client: Docker Engine - Community
 Version:           25.0.1
 API version:       1.44
 Go version:        go1.21.6
 Git commit:        29cf629
 Built:             Tue Jan 23 23:09:46 2024
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          25.0.1
  API version:      1.44 (minimum version 1.24)
  Go version:       go1.21.6
  Git commit:       71fa3ab
  Built:            Tue Jan 23 23:09:46 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.27
  GitCommit:        a1496014c916f9e62104b33d1bb5bd03b0858e59
 runc:
  Version:          1.1.11
  GitCommit:        v1.1.11-0-g4bccb38
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Docker info

Client: Docker Engine - Community
 Version:    25.0.1
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.12.1
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.24.2
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 4
  Running: 3
  Paused: 0
  Stopped: 1
 Images: 42
 Server Version: 25.0.1
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: a1496014c916f9e62104b33d1bb5bd03b0858e59
 runc version: v1.1.11-0-g4bccb38
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.5.0-5-amd64
 Operating System: Debian GNU/Linux trixie/sid
 OSType: linux
 Architecture: x86_64
 CPUs: 12
 Total Memory: 31.13GiB
 Name: danvergara
 ID: 907647ef-4861-4c09-bdc8-0449fe6f2bad
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: fals

What happened?

I need to build a container based off the Dockerfile that is located at the root at the project. So, every time I run this something like the example below I get an error like the title.

c, err := GenericContainer(ctx, GenericContainerRequest{
    ContainerRequest: ContainerRequest{
        FromDockerfile: FromDockerfile{
            Context:       ".",
            PrintBuildLog: true,
            BuildOptionsModifier: func(buildOptions *types.ImageBuildOptions) {
                buildOptions.Target = "development"
            },
        },
    },
    Started: true,
})

Relevant log output

2024/02/06 21:35:16 Failed to build image: error during connect: Post "http://%2Fvar%2Frun%2Fdocker.sock/v1.44/build?buildargs=%7B%22GITLAB_TOKEN%22%3A%22%22%7D&cachefrom=null&cgroupparent=&cpuperiod=0&cpuquota=
0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&forcerm=1&labels=null&memory=0&memswap=0&networkmode=&rm=1&shmsize=0&t=71107202-5f53-46db-8004-53ef95c17601%3A48df2665-8859-4ad2-ac21-e1974f6b2f2e&targ
et=development&ulimits=null&version=": io: read/write on closed pipe, will retry

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn issue with the librarygood first issueWant to contribute to testcontainers? Start from here

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions