nektos/act · error

failed to create container: '%w'

Error message

failed to create container: '%w'

What it means

Error "failed to create container: '%w'" thrown in nektos/act.

Source

Thrown at pkg/container/docker_run.go:501

createResult, err := cr.cli.ContainerCreate(ctx, client.ContainerCreateOptions{
	Config:           config,
	HostConfig:       hostConfig,
	NetworkingConfig: networkingConfig,
	Platform:         platSpecs,
	Name:             input.Name,
})
if err != nil {
	return fmt.Errorf("failed to create container: '%w'", err)
}

View on GitHub (pinned to 4f41128141)

Solutions

  1. Verify the image exists locally or can be pulled (docker pull <image>).
  2. Check the wrapped Docker daemon error for the concrete cause (name conflict, invalid config, missing image).
  3. Remove stale containers with the same name (act --rm or docker rm) and retry.

When it happens

Trigger: Thrown at pkg/container/docker_run.go:501 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of nektos/act@4f41128141 (2026-08-15). Data as JSON: /api/errors/28409fa5507ce904. Report an issue: GitHub.