Skip to main content

Dockerfile Linter

Check a Dockerfile against best practices: pinned images, apt and pip flags, USER, secrets and more. Each finding has a fix. Private.

Dockerfile

Stays in your browser

Findings

Press Check to see the findings.

Shortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)

Free Online Dockerfile Linter

Paste a Dockerfile and see what could be better: images without a fixed version, packages that bloat the image, secrets written in the file, and containers that run as root. Safe fixes can be applied in one click. It gives developers a quick browser-based way to solve a focused dockerfile linter task before moving the result into a project.

How to use the dockerfile linter

Paste your file in the box, or open it, and press Check. Each finding shows the line, how serious it is and how to fix it. Press "Apply safe fixes" to get a corrected Dockerfile for the simple ones.

Common mistakes

  • Putting a password or token in ENV or ARG: it stays readable in the image history.
  • Installing packages without cleaning the package lists, which makes every layer larger.

Frequently asked questions

Why pin the base image version?
FROM node means node:latest, which changes without warning and can break a build that worked yesterday. A fixed tag such as node:20.11-alpine makes builds repeatable.
Why use COPY instead of ADD?
ADD also downloads URLs and unpacks archives, which can surprise you. COPY only copies files, so it is easier to reason about.
Why should the container not run as root?
If an attacker breaks into the app, root inside the container makes it much easier to harm the host. Create a user and switch to it with USER.
Is my file uploaded anywhere?
No. The checks run in your browser and nothing you paste is sent to a server.
How do I use this dockerfile linter tool?
Use the interactive controls above; processing stays in your browser and the result is intended as a practical starting point for development work.

More DevOps & Network

View all DevOps & Network tools →