{"tool":"docker","tool_display":"Docker","intent":"run-command-with-published-ports","intent_display":"run command with published ports","title":"Docker Command: run command with published ports","command_string":"docker run -p <host_port>:<container_port> <image> <command>","raw_command_string":"docker {{[run|container run]}} {{[-p|--publish]}} {{host_port}}:{{container_port}} {{image}} {{command}}","description":"Exact CLI syntax to run command with published ports using Docker.","usage_scenario":"When exposing an application service on a specific host port for outside access.","scenario_context":"Use published ports to access services running in Docker containers externally.","simulated_output":"CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                     NAMES\nabc123def456        my_app:latest      \"/start.sh\"            10 seconds ago      Up 10 seconds       0.0.0.0:8080->80/tcp     my_app_container","how_to_steps":["Run the command: `docker run -p 8080:80 my_app /start.sh`","Verify the running container: `docker ps`"],"inferred_category":"Containers","canonical_url":"https://www.syntaxstandard.com/docker/run-command-with-published-ports"}