npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dockerforge/core

v0.2.5

Published

DockerForge engine: analyse a local project and generate production-grade Dockerfiles, .dockerignore, and Compose, and lint Dockerfiles. Offline, no network.

Downloads

62

Readme

@dockerforge/core

The engine behind DockerForge. Generate and lint production-grade Dockerfiles from Node. Offline.

npm license node

Give it a path to a local project and it analyses the stack and returns a Dockerfile, a .dockerignore, and a Compose file, along with a confidence score and suggested improvements. It also lints existing Dockerfiles. The package makes no network calls; it only reads the local filesystem under the path you give it.

Most people should use the @dockerforge/cli command line tool. Use this package when you want to call the engine from your own Node code.

Install

npm install @dockerforge/core

Generate

The supported public API is exported from the package root. Internal files under src/engine are not part of the compatibility contract.

const core = require('@dockerforge/core');

const projectPath = await core.ingestLocal('./my-app');
const result = await core.runDockerfileEngine({ projectPath });

console.log(result.dockerfile);     // the generated Dockerfile
console.log(result.dockerignore);   // the generated .dockerignore
console.log(result.compose);        // the generated Compose file
console.log(result.confidence);     // a number between 0 and 1
console.log(result.improvements);   // suggested changes

runDockerfileEngine accepts:

| Field | Meaning | | --- | --- | | projectPath | Required. Absolute or relative path to the project directory. | | hints | Optional stack hints, for example { stack: 'node', port: 3000 }. | | optimise | Set to false to skip the optimisation pass. | | security | Set to false to skip the security pass. |

projectPath is required because this package is offline. Ingesting a remote git URL or a zip is part of the hosted product, not this package.

Lint

const { findings, summary } = await core.lint('./Dockerfile');

for (const f of findings) {
  console.log(f.severity, f.ruleId, f.message);
}
console.log(summary.counts); // { critical, high, medium, low, info }
console.log(summary.worst);  // the highest severity found, or null

Lint a string instead of a file:

await core.lint({ dockerfile: 'FROM node\nUSER root\n' });

The six rules (DF001–DF006) are documented in the rules reference.

Errors

The package throws typed errors, each carrying a .code: PathNotFoundError, NotADirectoryError, UnsupportedStackError, IngestError, and the base DockerForgeError. They are exported from the package root:

const { PathNotFoundError } = require('@dockerforge/core');

See the programmatic API guide for the full surface.

License

Apache-2.0.