Create a Docker Image In Cortex XSOAR - Administrator Guide - 6.10 - Cortex XSOAR - Cortex - Security Operations

Cortex XSOAR Administrator Guide

Cortex XSOAR
Creation date
Last date published
Administrator Guide

After due diligence has been completed and licenses checked, the following steps can be taken.


When using a custom Docker registry, including the Cortex XSOAR Container Registry, you must include localhost when you create a custom Docker image. Examples:

  • localhost.local/directory/container_name

  • localhost/directory/container_name

Prior to creating a new Docker image, we recommend you review the used_packages.csv file in the GitHub dockerfiles repository to determine if any existing Docker images already contain the Python modules you need. Find Requests in the Package Name column and scroll to the right to view the list of Docker images, and then search for the relevant Docker container name to view which modules are included in that image. Determine if the existing image is appropriate for your needs. If so, use the existing Docker image. If not, proceed with the following steps to create a new custom Docker image.

  1. In the War Room, type the following command:

    /docker_image_create name

  2. Add the following arguments:




    New Docker image name. Lower case only


    New Docker image dependencies. Python libs like stix or requests, can have multiple comma separated libs: lib1,lib2,lib3.


    New Docker image packages. OS packages like libxslt or wget, can have multiple comma separated packages: pkg1,pkg2,pkg3.


    New Docker image base image to use. It must be Ubuntu-based with Python installed. Default is demisto/python3-deb base image, with Python 3.x.

    In the following example create a Docker image called example_name and use the Python dependency, Mechanize. You can specify OS packages. This example requires wget as a package.

    /docker_image_create name=example_name dependencies=mechanize packages=wget


    For Python modules, dependencies are not automatically added. If a Python module has dependencies, you need to specify them.

    Example of a request including the idna and chardet dependencies:

    /docker_image_create name=custom/requests dependencies=idna,chardet,requests base="demisto/python3-deb:

    When the Docker image is created, the following dialog box appears.


    The Docker image is ready to use.

  3. (Optional) If you need to update a Docker image, type the following command:


  4. Add the following arguments:




    The name of the image.


    Pulls all images.

  5. (Optional) To see all available images, type the following:


    This command does not accept any arguments and lists all available Docker images.