# Docker Generator

> Generate a Dockerfile or a Compose service snippet from image, ports, and command fields. Snippets are built in the tab.

Runs in your browser. Nothing is uploaded.

[Ops](https://toolbuddy.dev/categories/ops.md)

## About this tool

Generate a Dockerfile or Compose service from image, workdir, ports, and command.

How to use: pick Dockerfile or Compose, fill fields, copy. This does not build or push images.

Example: node:22-alpine plus EXPOSE 3000 yields a small Node Dockerfile. Related: GitHub Actions explainer for CI YAML.

## Related Ops tools

- [Gitignore Generator](https://toolbuddy.dev/tools/gitignore-generator.md): Build a .gitignore from stacked templates for Node, Python, Go, Rust, Java, Next.js, macOS, and Windows. Output is composed locally.
- [.env Toolkit](https://toolbuddy.dev/tools/env-toolkit.md): Parse KEY=value env files, flag duplicates, and diff two .env blobs. Secrets in env files never leave the browser.
- [GitHub Actions Explainer](https://toolbuddy.dev/tools/github-actions-explainer.md): Explain a GitHub Actions workflow YAML: name, triggers, jobs, and steps. Parsing uses js-yaml in the browser.
- [cURL Generator](https://toolbuddy.dev/tools/curl-generator.md): Build a curl command from method, URL, headers, and body. The command is assembled locally so tokens in headers stay in the tab.
- [Tar Command Generator](https://toolbuddy.dev/tools/tar-generator.md): Build a tar create or extract command with gz, bz2, or xz flags. A small command helper, not an archiver.
- [MySQL Command Generator](https://toolbuddy.dev/tools/mysql-generator.md): Build mysql or mysqldump command lines from user, host, and database. The command is text only; it does not connect to a server.
