datalad-containers-add [-h] [-u URL] [-d DATASET] [--call-fmt FORMAT] [-i IMAGE] [--update] NAME


Add a container to a dataset



The name to register the container under. This also determines the default location of the container image within the dataset. Constraints: value must be a string

-h, –help, –help-np

show this help message. –help-np forcefully disables the use of a pager for displaying the help message

-u URL, –url URL

A URL (or local path) to get the container image from. If the URL scheme is one recognized by Singularity, ‘shub://’ or ‘docker://’, the command format string will be auto-guessed when –call-fmt is not specified. For the scheme ‘dhub://’, the rest of the URL will be interpreted as the argument to ‘docker pull’, the image will be saved to the location specified by NAME, and the call format will be auto-guessed if not given. Constraints: value must be a string [Default: None]

-d DATASET, –dataset DATASET

specify the dataset to add the container to. If no dataset is given, an attempt is made to identify the dataset based on the current working directory. Constraints: Value must be a Dataset or a valid identifier of a Dataset (e.g. a path) [Default: None]

–call-fmt FORMAT

Command format string indicating how to execute a command in this container, e.g. “singularity exec {img} {cmd}”. Where ‘{img}’ is a placeholder for the path to the container image and ‘{cmd}’ is replaced with the desired command. Additional placeholders: ‘{img_dspath}’ is relative path to the dataset containing the image. Constraints: value must be a string [Default: None]

-i IMAGE, –image IMAGE

Relative path of the container image within the dataset. If not given, a default location will be determined using the NAME argument. Constraints: value must be a string [Default: None]


Update the existing container for NAME. If no other options are specified, URL will be set to ‘updateurl’, if configured. If a container with NAME does not already exist, this option is ignored. [Default: False]


datalad is developed by The DataLad Team and Contributors <>.