RunDockerCommand
This command will allow you to run commands against a local Docker Container. You can run commands like wc for instance with word count, or other types of commands that you want on the docker container. We recommend for tools that you want to use that are not part of the default Docker container, to cope this Automation script and then create a customer docker container with /docker_image_create with a custom docker container to add any command level tool to Demisto and output the results directly to the context.
python · Common Scripts
Details
| ID | RunDockerCommand |
|---|---|
| Language | python |
| From Version | 5.0.0 |
| Docker Image | demisto/python3:3.12.13.10404775 |
| Tags | Utilities |
README
Allows you to run commands against a local Docker container. A command such as wc with word count, or other types of commands that you want on the docker container.
We recommend for tools that you want to use that are not part of the default Docker container, to cope this Automation script and then create a customer docker container with /docker_image_create with a custom docker container to add any command level tool to Cortex XSOAR and output the results directly to the context.
Script Data
| Name | Description |
|---|---|
| Script Type | python |
| Tags | Utilities |
Inputs
| Argument Name | Description |
|---|---|
| cmd | The command to enter. |
| sysargs | The sysargs to enter. |
Outputs
| Path | Description | Type |
|---|---|---|
| CommandResults.Command | Contains the command line tool name and arguments that were run. | Unknown |
| CommandResults.Results | Returns the results as a single string of the results. The results of the command will need to be parsed into the preferred format. Use commands such as ExtractRegex or create your own follow on automation script that will parse the results into your preferred format. |
Unknown |
commonfields: id: RunDockerCommand version: -1 name: RunDockerCommand script: '' type: python subtype: python3 tags: - Utilities comment: "This command will allow you to run commands against a local Docker Container. You can run commands like wc for instance with word count, or other types of commands that you want on the docker container. \n\nWe recommend for tools that you want to use that are not part of the default Docker container, to cope this Automation script and then create a customer docker container with /docker_image_create with a custom docker container to add any command level tool to Demisto and output the results directly to the context." enabled: true args: - name: cmd default: true description: Enter Command. - name: sysargs description: enter sysargs. outputs: - contextPath: CommandResults.Command description: This will contain the command line tool name and arguments that were ran. - contextPath: CommandResults.Results description: This will have the full results as a single string of the results. You will need to parse the results of the command into the format you want. Try looking at commands like ExtractRegex or create your own follow on automation script that will parse the results into the format you would like. scripttarget: 0 fromversion: 5.0.0 dockerimage: demisto/python3:3.12.13.10404775 tests: - No tests (auto formatted)