| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
new-dockerfile is a CLI tool and Go package automatically generates a configurable Dockerfile based on your project source code. It supports a wide range of languages and frameworks, including Next.js, Node.js, Python, Ruby, Java/Spring Boot, Go, Elixir/Phoenix, and more.
See the GitHub Repository for full runtime documentation.
See the FlexStack Documentation page for FlexStack-specific documentation related to this tool.
Using npx:
npx new-dockerfile [options]Install the CLI globally:
npm install -g new-dockerfilePrint the generated Dockerfile to the console:
new-dockerfileWrite a Dockerfile to the current directory:
new-dockerfile --writeWrite a Dockerfile to a specific directory:
new-dockerfile > path/to/DockerfileForce a specific runtime:
new-dockerfile --runtime next.jsList the supported runtimes:
new-dockerfile --runtime listThe tool searches for common files and directories in your project to determine the runtime and framework. For example, if it finds a package.json file, it will assume the project is a Node.js project unless a next.config.js file is present, in which case it will assume the project is a Next.js project.
From there, it will read any .tool-versions or other version manager files to determine the correct version of the runtime to install. It will then make a best effort to detect any install, build, and start commands. For example, a serve, start, start:prod command in a package.json file will be used as the start command.
Runtimes are matched against in the order they appear when you run new-dockerfile --runtime list.
Read on to see runtime-specific examples and how to configure the generated Dockerfile.
| Back | FazBrowse Home | New Git URL |