{"record":{"id":"a657052e2c03d3af","repo":"nektos/act","slug":"no-name-set-for-network","errorCode":null,"errorMessage":"no name set for network","messagePattern":"no name set for network","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"pkg/container/docker_cli.go","lineNumber":868,"sourceCode":"\t\t}\n\t}\n\tif copts.ipv6Address != nil {\n\t\tif ipv6, ok := netip.AddrFromSlice(copts.ipv6Address.To16()); ok {\n\t\t\tn.IPv6Address = ipv6\n\t\t}\n\t}\n\tif copts.macAddress != \"\" {\n\t\tn.MacAddress = copts.macAddress\n\t}\n\tif copts.linkLocalIPs.Len() > 0 {\n\t\tn.LinkLocalIPs = toNetipAddrSlice(copts.linkLocalIPs.GetSlice())\n\t}\n\treturn nil\n}\n\nfunc parseNetworkAttachmentOpt(ep opts.NetworkAttachmentOpts) (*network.EndpointSettings, error) {\n\tif strings.TrimSpace(ep.Target) == \"\" {\n\t\treturn nil, errors.New(\"no name set for network\")\n\t}\n\tif !container.NetworkMode(ep.Target).IsUserDefined() {\n\t\tif len(ep.Aliases) > 0 {\n\t\t\treturn nil, errors.New(\"network-scoped aliases are only supported for user-defined networks\")\n\t\t}\n\t\tif len(ep.Links) > 0 {\n\t\t\treturn nil, errors.New(\"links are only supported for user-defined networks\")\n\t\t}\n\t}\n\n\tepConfig := &network.EndpointSettings{\n\t\tGwPriority: ep.GwPriority,\n\t}\n\tepConfig.Aliases = append(epConfig.Aliases, ep.Aliases...)\n\tif len(ep.DriverOpts) > 0 {\n\t\tepConfig.DriverOpts = make(map[string]string)\n\t\tepConfig.DriverOpts = ep.DriverOpts\n\t}","sourceCodeStart":850,"sourceCodeEnd":886,"githubUrl":"https://github.com/nektos/act/blob/4f411281417e88660bea1c1a1749aa71ae0bd60f/pkg/container/docker_cli.go#L850-L886","documentation":"Error [99]: act's docker socket resolution found neither a usable DOCKER_HOST env var, a docker context, nor a valid socket in the usual locations (/var/run/docker.sock etc.), and the configured socket value is not a URI. Act refuses to proceed because there is no daemon endpoint to talk to and no explicit '-' (don't-mount) opt-out. This fails before any container work starts.","triggerScenarios":"getSocketAndHost early-exit: DOCKER_HOST unset, docker context points nowhere, default socket path doesn't exist or isn't a socket, and the derived Socket value is a bare path (not unix:// or tcp://). Typical on hosts without Docker installed, WSL without Docker Desktop, rootless docker with XDG_RUNTIME_DIR unset, or containers/CI where /var/run/docker.sock isn't mounted.","commonSituations":"Fresh machine without Docker; running act inside a container without mounting the docker socket; rootless Docker where the socket is at $XDG_RUNTIME_DIR/docker.sock and the env is missing; WSL distro without Docker Desktop integration; colima not started.","solutions":["Install/start Docker: systemctl start docker (or open Docker Desktop, or 'colima start')","Point DOCKER_HOST at the real socket: export DOCKER_HOST=unix:///run/user/1000/docker.sock (rootless) or the colima socket","If running act in a container: mount -v /var/run/docker.sock:/var/run/docker.sock","If you deliberately don't want the socket mounted, pass '-' as the socket value so act skips mounting instead of erroring"],"exampleFix":"# before: rootless docker socket unknown to act\nexport PATH=$HOME/.docker/run:$PATH  # act still fails\n# after\nexport DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock\nact -j build","handlingStrategy":"validation","validationCode":"// Verify a docker endpoint exists before launching act\nimport (\n\t\"os\"\n\t\"os/exec\"\n)\n\nfunc dockerAvailable() bool {\n\tif os.Getenv(\"DOCKER_HOST\") != \"\" {\n\t\treturn true\n\t}\n\tif _, err := os.Stat(\"/var/run/docker.sock\"); err == nil {\n\t\treturn true\n\t}\n\treturn exec.Command(\"docker\", \"context\", \"show\").Run() == nil\n}","typeGuard":"func isDockerHostURI(v string) bool {\n\treturn strings.HasPrefix(v, \"unix://\") || strings.HasPrefix(v, \"tcp://\") || strings.HasPrefix(v, \"npipe://\")\n}","tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"DOCKER_HOST was not set\") {\n\t// guide user: start docker, or export DOCKER_HOST, or pass '-' to skip socket mount\n}","preventionTips":["Start docker (systemctl/docker desktop/colima) before act","Export DOCKER_HOST for rootless/remote daemons: unix://$XDG_RUNTIME_DIR/docker.sock","Mount /var/run/docker.sock when running act inside a container","Pass '-' explicitly when you intentionally want no socket mounted"],"tags":["docker","docker-host","socket","environment","setup"],"backgroundTag":null,"analyzedSha":"4f411281417e88660bea1c1a1749aa71ae0bd60f","analyzedAt":"2026-08-15T09:19:46.307Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}