Docker Compose Converter

Convert Docker run commands to Docker Compose format. Perfect for migrating from single container setups to Compose-based deployments.

Docker Run Command

Docker Compose

About This Tool

This tool helps you convert Docker run commands to Docker Compose format, making it easier to manage your containers as part of a Compose stack. Supports a comprehensive set of Docker run options:

  • Basic configuration (name, image, command)
  • Networking (ports, networks, DNS, hosts)
  • Storage (volumes, tmpfs, working directory)
  • Resources (CPU, memory, ulimits)
  • Security (capabilities, privileges, options)
  • Environment (variables, files)
  • Healthchecks and logging
  • Runtime (user, TTY, interactive mode)
  • System controls and device access

The tool supports multiple Docker Compose versions (2.x, 3.x, and latest) and preserves all supported settings from your docker run command.

Note: Some advanced Docker run options might need manual adjustment in the generated compose file. Always review the output for your specific needs.

Privacy Note: All Docker command conversion is performed locally in your browser. No commands or container configurations are transmitted or stored on any servers, ensuring your container setup remains completely private.

This tool is powered by composerize, created by Mark Larah and ShareVB.

composerize is licensed under the MIT License.