Docker Run Command Builder
Build docker run commands visually with ports, volumes, env vars, and generate docker-compose.yml.
About This Tool
The Docker Run Command Builder provides a visual GUI for
constructing docker run commands without memorizing
dozens of flags and options. Simply fill in the image name, add
port mappings, volume mounts, and environment variables, toggle
the flags you need, and the tool generates the complete command
in real time.
A built-in docker-compose.yml converter translates the same configuration into Compose format — useful when you want to persist your container setup in a project. If you need to validate existing Compose files, try the <Link href={getLocalePath(locale, "/tools/docker-compose-validator")} className="text-primary underline underline-offset-2"
Docker Compose Validator .
The tool includes presets for popular images like Nginx,
PostgreSQL, Redis, MySQL, and MongoDB, pre-filling common ports
and environment variables. Each flag includes an explanation
panel so beginners can learn what --detach,
--rm, and --restart actually do.
Before building your image, lint your Dockerfile with the
<Link
href={getLocalePath(locale, "/tools/dockerfile-linter")}
className="text-primary underline underline-offset-2"
Dockerfile Linter .
Everything runs client-side — your image names, environment secrets, and volume paths never leave your browser. The generated command can be copied with one click or keyboard shortcut. For converting curl commands to code, see the <Link href={getLocalePath(locale, "/tools/curl-to-code")} className="text-primary underline underline-offset-2"
Curl to Code Converter .
How to Use
- Optionally select a Preset (Nginx, PostgreSQL, etc.) to auto-fill common settings.
- Enter the Docker image name (e.g.,
nginx:alpine). - Add port mappings by clicking the + button and entering host:container pairs.
- Add volume mounts and environment variables as needed.
- Toggle flags like
--detach,--rm,--restartusing the checkboxes. - The generated command updates in real time in the preview pane. Click Copy or press Ctrl+Shift+C to copy it.
- Toggle Compose view to see the equivalent
docker-compose.yml.
Popular Docker Run Examples
FAQ
Is my data safe?
Yes. The entire command is built locally in your browser using string operations. No data — including image names, environment variables, or volume paths — is ever sent to any server.
What is the difference between docker run and docker-compose?
docker run starts a single container from the command line. docker-compose uses a YAML file (docker-compose.yml) to define and run multi-container applications. This tool can generate both formats from the same configuration.
What does the --rm flag do?
The --rm flag automatically removes the container when it stops. This is useful for one-off tasks or development containers where you don't need to keep the stopped container around.
Can I use custom networks?
Yes. Select 'custom' from the network dropdown and enter your network name. The generated command will include --network=your-network-name.
How do I map multiple ports or volumes?
Click the + button next to the ports or volumes section to add more entries. Each entry generates a separate -p or -v flag in the command.
What presets are available?
The tool includes presets for Nginx, PostgreSQL, Redis, MySQL, and MongoDB. Each preset fills in the image name, common ports, and required environment variables automatically.
Related Tools
Dockerfile Linter
Lint and validate Dockerfiles against best practices. Catch common issues before building images.
Docker Compose Validator
Validate and lint Docker Compose YAML files. Check service definitions, networks, volumes, and common configuration errors.
Nginx Config Generator
Generate Nginx server blocks visually. Configure reverse proxy, SSL, static files, and redirects with a GUI.
Curl to Code Converter
Convert curl commands to Python, JavaScript fetch, PHP, Go, and more programming languages.
K8s Manifest Validator
Validate Kubernetes YAML manifests for common issues — missing fields, deprecated APIs, security misconfigs, and best practice violations.
AWS CLI Command Builder
Build AWS CLI commands visually. Select service, operation, fill in parameters, and generate ready-to-use aws commands with syntax highlighting.
Helm Values Validator
Validate Helm values.yaml files against common patterns and best practices. Check types, compare overrides, and view value trees.
K8s Pod Spec Builder
Visually build Kubernetes Pod, Deployment, StatefulSet, and DaemonSet YAML manifests with containers, probes, volumes, and tolerations.
Health Check Endpoint Designer
Design health check endpoint JSON responses with component checks, HTTP status mapping, and Kubernetes probe formats.
Semantic Release Config Builder
Generate semantic-release configuration files visually. Select plugins, configure branches, set release rules, and export as JSON, YAML, or JS.
Systemd Unit File Generator
Generate systemd service unit files visually. Configure service type, restart policy, environment variables, and download ready-to-use .service files.
GitHub Actions Workflow Builder
Build GitHub Actions workflow YAML files visually. Configure triggers, jobs, steps, matrix strategies, and secrets references.
Makefile Generator
Generate Makefiles visually with targets, dependencies, variables, and templates for C, Go, Node.js, Python, and Docker projects.
GitLab CI Config Generator
Build .gitlab-ci.yml pipeline configurations visually. Define stages, jobs, artifacts, caching, and rules for GitLab CI/CD.
Shell Script Linter
Lint and check bash/shell scripts for common issues, deprecated syntax, and best practices. Catch bugs before they reach production.
Docker CLI Reference
Comprehensive Docker CLI command reference with search, categories, flags, examples, Dockerfile instructions, and reverse lookup.