JetBrains Rider 2018.1 Help

Run/Debug Configuration: Docker

Run | Edit Configurations | new | Docker


Docker run configurations enable you to integrate Docker into your development process. Settings depend on the type of the Docker run configuration relevant to your needs. Some settings are common, while others are specific in each case.

For more information, see Running Docker images.


Common settings

The following settings are available for any type of Docker run configuration:

ItemDescription
NameSpecify the name of the run configuration.
Share

Select to share the run configuration through version control.

If the checkbox is not selected, the run configuration settings are stored in .idea/workspace.xml.

If the checkbox is selected, the settings are stored in a separate .xml file in .idea/runConfigurations or in the .ipr file.

Single instance onlySelect to run only one instance of the run configuration at a time.
Server

Select the Docker server configuration to be used.

To create a new configuration or edit an existing one, click browseButton (Shift+Enter). For more information, see Docker.

Docker Image run configuration settings

The following settings are available for the Docker Image run configuration:

ItemDescription
Image IDSpecify the ID of the image to run.
Container nameSpecify an optional name for the container. If empty, Docker will generate a random name for the container.
Entrypoint Override the default ENTRYPOINT set by the image. Similar to using the --entrypoint option with docker run.
Command Override the default CMD set by the image. Similar to specifying the optional COMMAND argument after docker run.
Publish exposed ports to the host interfaces Select All to expose all container ports to the host or select Specify to specify which container ports to bind.
Bind ports Specify the list of port bindings. Similar to using the -p option with docker run.
Bind mounts Specify the list of volume bindings. Similar to using the -v option with docker run.
Environment variables Specify the list of environment variables. Similar to using the -e option with docker run.
Command line options Specify arbitrary options for the docker run command.
Command previewPreview the resulting command that will be used to execute the run configuration.

Docker-compose run configuration settings

The following settings are available for the Docker-compose run configuration:

ItemDescription
Compose fileSpecify the Docker Compose file to use for this run configuration.

Dockerfile run configuration settings

The following settings are available for the Dockerfile run configuration:

ItemDescription
DockerfileSpecify the Dockerfile to be used for this run configuration.
Image tag Specify the name and tag for the built image. Similar to using the -t option with docker build.
Build args Override the default build-time variables. Similar to using the --build-arg option with docker build.
Run built imageSelect to run a container based on the built image.
Container nameSpecify an optional name for the container. If empty, Docker will generate a random name for the container.
Entrypoint Override the default ENTRYPOINT set by the image. Similar to using the --entrypoint option with docker run.
Command Override the default CMD set by the image. Similar to specifying the optional COMMAND argument after docker run.
Publish exposed ports to the host interfaces Select All to expose all container ports to the host or select Specify to specify which container ports to bind.
Bind ports Specify the list of port bindings. Similar to using the -p option with docker run.
Bind mounts Specify the list of volume bindings. Similar to using the -v option with docker run.
Environment variables Specify the list of environment variables. Similar to using the -e option with docker run.
Command line options Specify arbitrary options for the docker run command.
Command previewPreview the resulting command that will be used to execute the run configuration.

Before launch

Specify tasks to perform before starting the run configuration.

ItemShortcutDescription
new Ctrl+NAdd a task to the list, for example:
  • Run External tool

  • Run Another Configuration

    Execute another run configuration.

  • Build project
delete Ctrl+R, DRemove the selected task from the list.
edit1 EnterEdit the selected task.
arrowUp arrowDownAlt+Up/Alt+Down Move the selected task one line up or down in the list, changing the order for performing the tasks.
Show this pageSelect to show the run configuration settings before starting it.
Activate tool windowSelect to open the Docker tool window before starting the run configuration.

Toolbar

ItemShortcutDescription
newCtrl+NCreate a run/debug configuration.
deleteCtrl+R, DDelete the selected run/debug configuration.
copyCtrl+DCreate a copy of the selected run/debug configuration.
settingsView and edit the default settings for the selected run/debug configuration.
arrowUparrowDownAlt+Up/Alt+DownMove the selected run/debug configuration up and down in the list.

The order of configurations in the list defines the order in which the configurations appear in the corresponding list on the main toolbar.

folderYou can group run/debug configurations by placing them into folders.

To create a folder, select the configurations to be grouped and click folder. Specify the name of the folder.

Then, to move a configuration into a folder, between the folders or out of a folder, use arrowUp and arrowDown. You can also drag a configuration into a folder.

To remove grouping, select a folder and click delete.

See also, Creating Folders and Grouping Run/Debug Configurations.

Last modified: 20 August 2018

See Also