{"record":{"id":"baa13c06e0a0c32a","repo":"slimtoolkit/slim","slug":"no-service-image","errorCode":null,"errorMessage":"no service image","messagePattern":"no service image","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/app/master/compose/execution.go","lineNumber":24,"sourceCode":"\t\"encoding/json\"\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"sync\"\n\t\"time\"\n\n\t\"github.com/slimtoolkit/slim/pkg/app\"\n\t\"github.com/slimtoolkit/slim/pkg/docker/dockerutil\"\n\n\t\"github.com/compose-spec/compose-go/loader\"\n\t\"github.com/compose-spec/compose-go/types\"\n\tdockerapi \"github.com/fsouza/go-dockerclient\"\n\tlog \"github.com/sirupsen/logrus\"\n)\n\nvar ErrNoServiceImage = errors.New(\"no service image\")\n\ntype ServiceError struct {\n\tService string\n\tOp      string\n\tInfo    string\n}\n\nfunc (e *ServiceError) Error() string {\n\treturn fmt.Sprintf(\"compose.ServiceError: service=%s op=%s info='%s'\",\n\t\te.Service, e.Op, e.Info)\n}\n\ntype ovars = app.OutVars\n\ntype ExecutionState string\n\nconst (\n\tXSNone        ExecutionState = \"xs.none\"","sourceCodeStart":6,"sourceCodeEnd":42,"githubUrl":"https://github.com/slimtoolkit/slim/blob/81940d17fa112cc678e32209214bcb2355cb3004/pkg/app/master/compose/execution.go#L6-L42","documentation":"ErrNoServiceImage is defined in pkg/app/master/compose/execution.go and signals that a compose service has no image to work with — the service definition lacks an image and no built image is available, so the compose execution cannot proceed for that service.","triggerScenarios":"Running the compose execution/minification flow against a compose file whose service omits the `image` key and relies solely on a `build` section without a pre-built image present.","commonSituations":"Compose files that only specify build:; services expected to be built by an earlier step that was never run; typos in the service name in the compose file.","solutions":["Add an `image:` field to the service in the compose file","Build the image first (docker compose build) so a local image exists before running the tool","Verify you targeted the correct service name in the compose project"],"exampleFix":"# before\nservices:\n  app:\n    build: ./app\n# after\nservices:\n  app:\n    build: ./app\n    image: myapp:latest","handlingStrategy":"validation","validationCode":"svc := project.Services[\"app\"]\nif svc.Image == \"\" {\n\treturn fmt.Errorf(\"service %q has no image; add an image: field or build first\", \"app\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always set image: alongside build: in compose services","Run docker compose build before image-processing tools","Double-check service names in the compose file"],"tags":["compose","docker","configuration"],"backgroundTag":"missing-image-reference","analyzedSha":"81940d17fa112cc678e32209214bcb2355cb3004","analyzedAt":"2026-08-31T23:06:12.682Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}