Download Content Packs and Docker Images Offline
The download_packs_and_docker_images script enables offline users to download content packs and the content pack's latest Docker images to their computer and upload these packs and images to their Cortex XSOAR environment.
To run the script, indicate which packs to download by entering the names of the packs exactly as they appear in https://xsoar.pan.dev/marketplace. If you enter an incorrect pack name, the script will display an error message and skip that pack. You can also enter a file that contains the names of the packs.
The script downloads the content packs you want and the pack's Docker images as zip files to the output path you provide. If you do not provide a an output path, it will download the files to the folder from which you ran the script. You can then upload these packs and images to your Cortex XSOAR environment.
The download_packs_and_docker_images.py script is located in the Utils folder in the GIT Content repository. If you do not have access to the GIT Content repository, you can download the script from here.
Note: If the provided download_packs_and_docker_images.py script does not exactly fit your environment or needs, use the script as an example and edit it as needed.
The following are the options for running the script:
|-h, --help||Displays a list of options and descriptions.||Optional|
|-p <names of packs>, --packs <names of packs>||Comma-separated list of pack names, or the name of the file that contains the pack names. The pack names must be as they appear in https://xsoar.pan.dev/marketplace. In the file that contains the pack names, each pack name must be on a new line.||Required|
|-o <output path>, --output_path <output path>||The path where the files will be downloaded to.||Optional|
|-sp, --skip_packs||Don't download packs.||Optional|
|-sd, --skip_docker||Don't download Docker images.||Optional|
|--insecure||Skip certificate validation.||Optional|
- Python 3.8 or above.
- Python Requests Library installed - Can be installed by running the pip install requests or pip3 install requests command.
- Need to have your content repository cloned on your machine.
If downloading Docker images:
- Docker Client installed
- Python Docker Library installed - Can be installed by running the pip install docker or pip3 install docker command.
#Download Content Packs and Docker Images
Ensure that all prerequisites are met.
Run the download script by typing the following with a comma-separated list of names of the packs to download:
python3 <path to the script> -p <name of the packs>
For example: python3 ./Utils/download_packs_and_docker_images.py -p "AWS - IAM,Cybereason"
Upload the Docker images.
Run the following command for each of the docker images:
docker load -i <path to the docker tar file>
If using podman (Red Hat 8.x) use the following commmand:
sudo su -s /bin/bash - demisto -c 'podman load -i <FULL PATH TO YOUR DOCKER FILE>.tar'
Note: make sure the tar file is located in a directory which the
demistouser has read access both to the dir and file, such as /tmp.
sudo su -s /bin/bash - demisto -c 'podman load -i /tmp/python3_188.8.131.5299.tar'
Upload the content packs to your Cortex XSOAR environment.
- In your Cortex XSOAR environment, go to Marketplace.
- Click the 3 vertical dots and select Upload Content.
- Select the content zip files to upload.