Skip to content

Commit 11bdcb5

Browse files
committed
Ignore base image
1 parent b325d85 commit 11bdcb5

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

web/lib/compose-parser.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,20 @@ export function parseComposeYaml(yamlContent: string): ComposeParseResult {
369369
const definedVolumes = new Set(Object.keys(composeFile.volumes || {}));
370370

371371
for (const [serviceName, serviceConfig] of Object.entries(composeFile.services)) {
372+
const isTemplateService =
373+
!serviceConfig.command &&
374+
!serviceConfig.entrypoint &&
375+
!serviceConfig.ports?.length;
376+
377+
if (isTemplateService) {
378+
warnings.push({
379+
service: serviceName,
380+
field: "service",
381+
message: `Service '${serviceName}' appears to be a YAML anchor template (no command, entrypoint, or ports). Skipping.`,
382+
});
383+
continue;
384+
}
385+
372386
if (!serviceConfig.image && serviceConfig.build) {
373387
errors.push({
374388
service: serviceName,

0 commit comments

Comments
 (0)