ToolTunnel

Dockerfile Analyzer

Analyze Dockerfiles for base images, build stages, instructions, ports, users, environment variables, caching opportunities, and common containerization issues.

Analyze Dockerfile

Inspect Dockerfile instructions, base images, build stages, ports, users, and common containerization issues.

Dockerfile Summary

Overview of the Dockerfile structure and detected issues.

InstructionsChange
7
Dockerfile instructions detected
StagesStages
1
FROM instructions / build stages
WarningsWarnings
1
Potential issues to review
ErrorsErrors
0
Important structural issues

Base Images

Images used by the Docker build stages.

Stage 1Line 1
node:20

Findings

Potential issues and useful observations detected in the Dockerfile.

3 findings
Warning

No USER instruction

The container may run as root by default. Consider using a dedicated non-root user where possible.

InfoLine 6

Shell-form RUN instructions

1 RUN instruction(s) use shell form. This is normal in many Dockerfiles, but exec form can provide more predictable process behavior for commands that need direct signal handling.

Info

Review dependency layer caching

Consider copying dependency manifests before application source files so dependency installation can be cached between builds.

Instruction Inventory

Every recognized Dockerfile instruction and its location.

Line 1FROM
node:20
Line 3WORKDIR
/app
Line 5COPY
package*.json ./
Line 6RUN
npm ci
Line 8COPY
. .
Line 10EXPOSE
3000
Line 12CMD
["npm", "start"]

Exposed Ports

3000

Runtime Configuration

WORKDIR/app
USERDefault
ENTRYPOINTNot specified
CMD["npm", "start"]

Analyzer Notes

This analyzer performs static Dockerfile analysis. It does not build the image or execute any Docker commands.

Warnings are recommendations rather than proof that a Dockerfile is insecure or incorrect. Some patterns are intentional depending on the application and deployment environment.

Never place passwords, API keys, tokens, or other sensitive credentials directly into Dockerfile ENV or ARG instructions.