{"uid":"cap_Y6m0pIbfkYymPNEPEr_yB","slug":"saylor-innovations-dockerfile-linter-e7ef2cbb","name":"Saylor Innovations Dockerfile Linter","description":"Dockerfile linter - 25+ rules with fixes, A-F grade and multi-stage advice","url":"https://saylorinnovations.com/api/dockerfile/lint?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method","queryParams"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["dockerfile"],"properties":{"dockerfile":{"type":"string","description":"required Dockerfile text, up to 20000 characters (query, URL-encoded)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string","const":"json"},"example":{"type":"object","required":["stages","instructions","findings","counts","passes"],"properties":{"grade":{"type":"string","description":"Letter grade"},"score":{"type":"number","description":"Score from 0 (worst) to 100 (best)"},"advice":{"type":"array","description":"The advice text"},"counts":{"type":"object","properties":{"info":{"type":["integer"]},"error":{"type":["integer"]},"warning":{"type":["integer"]}},"additionalProperties":true},"passes":{"type":"boolean"},"stages":{"type":"number"},"findings":{"type":"array","items":{"type":"object","properties":{"fix":{"type":["string"]},"line":{"type":["integer"]},"rule":{"type":["string"]},"message":{"type":["string"]},"severity":{"type":["string"]}},"additionalProperties":true},"description":"Issues or observations found"},"scope_note":{"type":"string","description":"What this data covers and what it leaves out"},"base_images":{"type":"array","items":{"type":"object","properties":{"line":{"type":["integer"]},"image":{"type":["string"]}},"additionalProperties":true},"description":"Base images"},"multi_stage":{"type":"boolean","description":"Multi stage"},"instructions":{"type":"number"},"related_endpoints":{"type":"array","items":{"type":"string"},"description":"Related endpoints"}},"additionalProperties":true},"description":{"type":"string"}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_juCi7r7EQg2bV2C1cEtys","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Lints a Dockerfile against 25+ rules, returning a letter grade (A–F), numeric score, categorized findings, fix suggestions, and multi-stage build advice.","exampleAgentPrompt":"Can you lint this Dockerfile for me and give it a grade? FROM ubuntu:latest\\nRUN apt-get update && apt-get install -y curl\\nCOPY . /app\\nCMD [\"/app/start.sh\"] — I want to see what rules it fails and how to fix them.","exampleUseCases":[{"title":"Pre-deployment Dockerfile quality gate","prompt":"Before I push this to production, can you run my Dockerfile through the linter and tell me if it passes, what grade it gets, and what I need to fix? Here's the content: FROM node:latest\\nWORKDIR /app\\nCOPY . .\\nRUN npm install\\nCMD [\"node\", \"index.js\"]"},{"title":"Security audit of a container build file","prompt":"I want to audit this Dockerfile for security issues — can you check it against best-practice rules, show me all the findings, and tell me how serious each one is? FROM python:3.9\\nRUN pip install flask\\nCOPY . /app\\nRUN chmod 777 /app\\nCMD [\"python\", \"/app/app.py\"]"},{"title":"Multi-stage build optimization review","prompt":"I've written a multi-stage Dockerfile and I want to know if I've structured it correctly — can you grade it, flag any inefficiencies, and give me advice specific to multi-stage builds? FROM golang:1.21 AS builder\\nWORKDIR /src\\nCOPY . .\\nRUN go build -o app\\nFROM alpine:latest\\nCOPY --from=builder /src/app /app\\nCMD [\"/app\"]"}],"resultDescription":"Returns a JSON object containing: a letter grade (A–F), a numeric score (0–100), a pass/fail boolean, an array of findings (issues or observations with associated rules), an array of fix advice strings, stage count, list of base images detected, a multi-stage boolean flag, categorized issue counts, a scope note describing coverage, and pointers to related endpoints.","failureModes":["Missing 'dockerfile' query parameter returns an error","Dockerfile text exceeding 20,000 characters is rejected","Malformed or non-Dockerfile text may produce low-confidence or empty findings","Network timeout on large Dockerfile inputs","Payment failure (x402) if USDC balance is insufficient"],"whenToPreferThis":"Choose this endpoint when you need automated, rule-based Dockerfile quality assessment with letter grading and actionable fix suggestions — especially useful in CI/CD pipelines, pre-deployment gates, or developer tooling where a quick, cheap ($0.01) structured lint report with 25+ rules and multi-stage awareness is sufficient, and you don't need a full container-image vulnerability scan or runtime analysis.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-20T00:03:10.224Z","isFirstParty":false,"canonicalSlug":"saylor-innovations-dockerfile-linter-e7ef2cbb"}