## Synopsis¶

datalad-containers-run [-h] [-n NAME] [-d DATASET] [-i PATH] [-o PATH] [-m MESSAGE] [--expand WHICH] [--explicit] [--sidecar yes|no] ...


## Description¶

Drop-in replacement of ‘run’ to perform containerized command execution

Container(s) need to be configured beforehand (see containers-add). If only one container is known, it will be selected automatically, otherwise a specific container has to be specified.

A command is generated based on the input arguments such that the container image itself will be recorded as an input dependency of the command execution in the RUN record in the git history.

## Options¶

### COMMAND¶

command for execution.

### -h, –help, –help-np¶

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

### -n NAME, –container-name NAME¶

Specify the name of or a path to a known container to use for execution, in case multiple containers are configured. [Default: None]

### -dDATASET, –datasetDATASET¶

specify the dataset to record the command results in. An attempt is made to identify the dataset based on the current working directory. If a dataset is given, the command will be executed in the root directory of this dataset. Constraints: Value must be a Dataset or a valid identifier of a Dataset (e.g. a path) [Default: None]

### -i PATH, –input PATH¶

A dependency for the run. Before running the command, the content of this file will be retrieved. A value of “.” means “run datalad get .”. The value can also be a glob. This option can be given more than once. [Default: None]

### -o PATH, –output PATH¶

Prepare this file to be an output file of the command. A value of “.” means “run datalad unlock .” (and will fail if some content isn’t present). For any other value, if the content of this file is present, unlock the file. Otherwise, remove it. The value can also be a glob. This option can be given more than once. [Default: None]

### -m MESSAGE, –message MESSAGE¶

a description of the state or the changes made to a dataset. Constraints: value must be a string [Default: None]

### –expand WHICH¶

Expand globs when storing inputs and/or outputs in the commit message. Constraints: value must be NONE, or value must be one of (‘inputs’, ‘outputs’, ‘both’) [Default: None]

### –explicit¶

Consider the specification of inputs and outputs to be explicit. Don’t warn if the repository is dirty, and only save modifications to the listed outputs. [Default: False]

### –sidecar yes|no¶

By default, the configuration variable ‘datalad.run.record-sidecar’ determines whether a record with information on a command’s execution is placed into a separate record file instead of the commit message (default: off). This option can be used to override the configured behavior on a case-by-case basis. Sidecar files are placed into the dataset’s ‘.datalad/runinfo’ directory (customizable via the ‘datalad.run.record-directory’ configuration variable). Constraints: value must be NONE, or value must be convertible to type bool [Default: None]