HARNESTS
TodayΒ£0.00
← all jobs
engineeringΒ·Β£1.00Β·done in seconds

Dockerfile Optimizer Review

Concrete improvements to a Dockerfile β€” layer order, cache hits, image size, security.

Β·

Your inputs

Fill the required fields above to enable.

More from Engineering

What you get

Get a list of concrete improvements to your Dockerfile, including layer order, cache hits, image size, and security. You'll receive a numbered list of changes with line references and quantifiable benefits.

Who it's for

  • DevOps engineers optimising containerised applications
  • Cloud architects reducing image sizes
  • Software developers improving Dockerfile security
  • Containerisation specialists enhancing cache hits

Use cases

  • When deploying a new application and needing to reduce Docker image size
  • While troubleshooting slow container startup times due to inefficient Dockerfiles
  • Before releasing a critical security patch to ensure Dockerfile security
  • After noticing increased storage costs due to large Docker images
  • When migrating applications to a new cloud provider with strict image size limits

FAQ

what will i get from this dockerfile optimiser

You'll get a numbered list of concrete improvements to your Dockerfile, including changes to layer order, cache hits, image size, and security, with estimated image-size deltas where applicable. Each change will be justified with a specific reason, such as cache, image-size, security, or reproducibility.

how much does it cost to optimise my dockerfile

The cost to optimise your Dockerfile is Β£1.00. You'll get a list of improvements with line references and quantifiable benefits for this price.

what do i need to provide to get my dockerfile optimised

You need to provide your Dockerfile by pasting it into the textarea. Our system will then generate a list of concrete improvements for you.

will the optimiser suggest alternative base images

The optimiser will suggest changes to your Dockerfile, including alternative base images, where it can provide a quantifiable benefit, such as reducing image size by a specific amount, e.g., 'change `FROM node:20` to `FROM node:20-alpine` (saves ~700MB)'.

Sample output

Here's the optimization review:

1. Line 1 β€” change `FROM node:20` to `FROM node:20-alpine` (saves ~700MB, image-size).
2. Line 3 β€” change `COPY . .` to `COPY package*.json ./` (improves cache, reduces unnecessary file copying).
3. Line 4 β€” change `RUN npm install` to `RUN npm ci` (improves reproducibility, ensures consistent dependencies).
4. No change to Line 5, as it's a simple command to run the application.

Estimated image-size delta: -700MB (due to the smaller base image).

Last updated: 2026-06-28

Dockerfile Optimizer Review | Harnests - End of the string.\n9. `i` - Flag for case-insensitive matching.\n\n**Worked Examples:**\n1. Input: \"SW1A 1AA\" β†’ Match: \"SW1A 1AA\"\n2. Input: \"M1 1AE\" β†’ Match: \"M1 1AE\"\n3. Input: \"sw1a1aa\" β†’ Match: \"sw1a1aa\" \n\nNote: The case-insensitive flag (`i`) allows the regex to match postcodes regardless of the case used in the input string."},"createdAt":"2026-06-28 11:47:36.596823+00"},{"id":456,"slug":"database-schema-explainer","name":"Database Schema Explainer","niche":"engineering","description":"A plain-English walkthrough of a SQL schema β€” what each table holds, key relationships, gotchas.","inputFields":[{"key":"ddl","type":"textarea","label":"Schema DDL (CREATE TABLE statements)","required":true,"maxLength":6000,"placeholder":"CREATE TABLE users (id uuid PRIMARY KEY, ...);\\nCREATE TABLE orders (id uuid PRIMARY KEY, user_id uuid REFERENCES users(id), ...);"}],"systemPrompt":"You explain SQL schemas like a senior engineer onboarding a new joiner. Sections: Per-table walkthrough (2–3 sentences each), Relationships (FK map), Things to watch (1–3 gotchas β€” soft deletes, denormalisation, surprising defaults, ON DELETE CASCADE). Refer only to tables/columns present in the DDL. Banned: \"appears to\", \"might\". Example β€” Bad: \"The orders table appears to reference users.\" Good: \"`orders.user_id` is a FK to `users.id` with no ON DELETE β€” deleting a user will fail if orders exist.\" Before responding: confirm every named column exists in the DDL.","userPromptTemplate":"Schema:\n{ddl}\n\nReturn the walkthrough in the structure above.","model":"claude-haiku-4-5-20251001","maxTokens":600,"priceGbp":1,"isActive":true,"outputType":"text","imageSize":null,"subcategory":"General","seo":{"faq":[{"a":"The explanation includes a per-table walkthrough, key relationships, and potential gotchas such as soft deletes and denormalisation. The walkthrough is approximately 2-3 sentences per table and is delivered in a plain-English format.","q":"what is included in the database schema explanation?"},{"a":"You provide your SQL schema by copying and pasting your DDL (CREATE TABLE statements) into a textarea. The system will then generate a personalised explanation based on your schema.","q":"how do i provide my sql schema?"},{"a":"The database schema explanation costs Β£1. This is a one-time payment and you will receive your explanation immediately after payment.","q":"how much does the database schema explanation cost?"},{"a":"The explanation is delivered in a plain-English text format, with each section clearly labelled and easy to understand. The format is designed to be easy to read and understand, even for those without extensive technical knowledge.","q":"what format is the explanation delivered in?"}],"useCases":["Trying to understand a database schema for a new project","Debugging a database issue and needing to review the schema","Onboarding to a new team and needing to learn the database structure","Reviewing a legacy codebase and needing to understand the database design","Preparing for a technical interview and wanting to review database concepts"],"whoItsFor":["Junior developers onboarding to a new project","Data analysts trying to understand a complex database","DevOps engineers debugging database issues","Backend engineers reviewing a legacy codebase"],"whatYouGet":"Get a plain-English explanation of your SQL schema in a personalised walkthrough, including key relationships and potential gotchas, all for Β£1.","sampleOutput":"### Per-table walkthrough\nThe `users` table has a primary key `id` of type `uuid`, which uniquely identifies each user. This table stores information about the users in the system. The `users` table does not reference any other tables.\n\nThe `orders` table has a primary key `id` of type `uuid`, which uniquely identifies each order, and a `user_id` column that references the `id` column in the `users` table. This establishes a relationship between orders and the users who made them. \n\n### Relationships\nThe relationships between tables can be summarized as follows:\n- `orders.user_id` is a foreign key (FK) to `users.id`, indicating that each order is associated with a user.\n\n### Things to watch\n- `orders.user_id` is a FK to `users.id` with no ON DELETE action specified, so deleting a user will fail if orders exist for that user, as this would violate the foreign key constraint."},"createdAt":"2026-06-28 11:47:35.825386+00"},{"id":469,"slug":"error-log-root-cause-analyzer","name":"Error Log Root Cause Analyzer","niche":"engineering","description":"An analysis of your error log β€” likely root cause, ranked hypotheses, next debugging steps.","inputFields":[{"key":"log","type":"textarea","label":"Error log or stack trace","required":true,"maxLength":4000,"placeholder":"TypeError: Cannot read properties of undefined (reading \\\"customerId\\\")\\n at settleInvoice (billing.ts:48)\\n ..."},{"key":"context","type":"textarea","label":"Recent context (deploys, traffic, related changes)","required":false,"maxLength":1000,"placeholder":"Deployed billing-svc 1f4a yesterday. Spike correlated with the start of EU business hours."}],"systemPrompt":"You analyse error logs to find a likely root cause. Sections: Most likely cause (1 paragraph, with evidence), Ranked alternative hypotheses (2–3), Next debug steps (numbered, 3–5, with specific commands or queries). Cite log lines as evidence. Banned: \"could be anything\", silent guessing. Example β€” Bad: \"It could be anything from a typo to a server issue.\" Good: \"Most likely: the customerId is null because invoice 8f2a was created before customer enrolment. Evidence: line 48 dereferences invoice.customer.id; no null guard.\" Before responding: confirm the most likely cause cites a specific log line.","userPromptTemplate":"Log:\n{log}\nContext:\n{context}\n\nReturn the analysis.","model":"claude-haiku-4-5-20251001","maxTokens":600,"priceGbp":1,"isActive":true,"outputType":"text","imageSize":null,"subcategory":"General","seo":{"faq":[{"a":"You'll get a report with the most likely root cause of the error, 2-3 ranked alternative hypotheses, and 3-5 next debugging steps with specific commands or queries. The report cites log lines as evidence to support the analysis.","q":"what will i get from the error log analysis"},{"a":"You'll provide context through a textarea where you can describe recent changes, deploys, or related events that may have contributed to the error. This helps the analysis focus on the most relevant factors.","q":"how do i provide context for the error log analysis"},{"a":"The analysis is performed immediately, and you'll receive your report for Β£1. The report is generated based on the error log and context you provide, with no waiting time.","q":"how long does the error log analysis take"},{"a":"The analysis is based on the specific error log and context you provide, making it tailored to your situation. You'll receive a unique report outlining the most likely cause and next steps for your particular error.","q":"can i get a personalised error log analysis"}],"useCases":["When an unexpected error occurs in your application","After a recent deployment causes issues","While trying to reproduce an intermittent bug","When analysing a stack trace from a crash report","During a debugging session to identify the root cause"],"whoItsFor":["DevOps engineers debugging production issues","Software developers troubleshooting code errors","QA testers analysing test failures","Technical support specialists resolving customer complaints"],"whatYouGet":"Get a detailed analysis of your error log in a formatted report, including the most likely root cause, ranked hypotheses, and next debugging steps for Β£1.","sampleOutput":"Most likely cause: the `customerId` is null or undefined because an invoice was created without a valid customer association. Evidence: line 48 in `billing.ts` attempts to access `invoice.customerId`, indicating that the `customerId` property is being dereferenced, but the error message suggests it does not exist. Specifically, the error log line \"TypeError: Cannot read properties of undefined (reading \\\"customerId\\\")\" at `settleInvoice (billing.ts:48)` implies that the `customerId` is not present in the `invoice` object, likely due to an incomplete or missing customer association when the invoice was created.\n\nRanked alternative hypotheses:\n1. **Data corruption**: It is possible that the data in the invoice or customer database is corrupted, leading to missing or null `customerId` values.\n2. **API integration issue**: The error might be caused by an issue with the API that provides customer information, resulting in incomplete or missing customer data being passed to the billing service.\n3. **Deployment-related configuration issue**: The recent deployment of `billing-svc 1f4a` might have introduced a configuration issue that affects how customer data is handled or retrieved.\n\nNext debug steps:\n1. **Inspect the invoice data**: Run a query to retrieve the invoice data for the specific invoice that triggered the error (e.g., `SELECT * FROM invoices WHERE id = 8f2a`) to verify if the `customerId` is indeed null or missing.\n2. **Check customer association**: Investigate the customer association logic to ensure that invoices are being created with valid customer associations (e.g., `SELECT * FROM customers WHERE id IN (SELECT customer_id FROM invoices)`).\n3. **Review deployment changes**: Compare the changes introduced in the `billing-svc 1f4a` deployment with the previous version to identify any potential issues related to customer data handling or API integrations (e.g., `git diff .. billing.ts`)."},"createdAt":"2026-06-28 11:47:36.552169+00"}]}