Skip to content

Commit

Permalink
hof/test: fix error in inception test
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Worm committed Dec 16, 2024
1 parent f25116e commit b246af3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/dagger/main/dockerd-in-dagger.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,23 +147,27 @@ func (R *runtime) daemonContainer() (*dagger.Container, error) {

c = c.WithEnvVariable("CACHE", time.Now().String())
c = c.WithExec([]string{"curl", "https://registry-1.docker.io"})
c = c.WithExec(
c = c.WithEntrypoint(
[]string{
"dockerd",
"--log-level=warn",
"--host=tcp://0.0.0.0:2375",
"--tls=false",
"--debug",
},
dagger.ContainerWithExecOpts{InsecureRootCapabilities: true},
)
return c, nil
}

func (R *runtime) attachService(c, s *dagger.Container) (*dagger.Container, error) {
t := c
t = t.WithEnvVariable("DOCKER_HOST", "tcp://global-dockerd:2375")
t = t.WithServiceBinding("global-dockerd", s)
t = t.WithServiceBinding("global-dockerd", s.AsService(
dagger.ContainerAsServiceOpts{
UseEntrypoint: true,
InsecureRootCapabilities: true,
},
))

return t, nil
}
Expand Down

0 comments on commit b246af3

Please sign in to comment.