# Docker run configurations

Use Docker run configurations to build Docker images and run containers from IntelliJ IDEA. For example, you can run a container with the database used by your application backend. Or you can build an image with your application binary, dependencies, and any other necessary files. This is called "dockerizing" an application.

> **Note:**
> If you want to run or debug your application in a specific environment, create a [Docker run target](run-targets.html#docker) and configure [your application's run configuration](run-debug-configuration.html) to use that run target instead of your machine's local environment.

Procedure: Create a Docker run configuration

1. In the main menu, go to `Run | Edit Configurations`.

2. In the Run/Debug Configurations dialog, click ![The Add New Configuration button](https://resources.jetbrains.com.cn/help/img/idea/2026.2/app.expui.general.add.svg), expand the Docker group, and select the desired type of run configuration.

IntelliJ IDEA provides the following types of Docker run configurations:

Docker Image
: Created automatically when you [run a container from an existing image](docker-containers.html#run_image). For more information, refer to [Docker Image run configuration](docker-image-run-configuration.html).
:
:
:
:
:
: For a specific example, refer to [Run a database in a Docker container](running-a-dbms-image.html).

Dockerfile
: Created automatically when you [run a container from a Dockerfile](docker-containers.html#run_image_dockerfile). For more information, refer to [Dockerfile run configuration](dockerfile-run-configuration.html).
:
:
:
:
:
: For a specific example, refer to [Dockerize a Java application](dockerize-java-app.html).

Docker Compose
: Created automatically when you [run a multi-container Docker application](docker-compose.html) from a [Docker Compose file](https://docs.docker.com/compose/overview/). For more information, refer to [Docker compose run configuration](docker-compose-run-configuration.html).

## Run Docker containers before another run configuration

You can set any Docker run configuration as a [Before launch](run-debug-configurations-dialog.html) task for another run configuration. For example, if your application relies on a running database, you can automatically run a Docker container with the database every time you run your application from sources.

## See also

### Reference

[Docker Image run configuration](docker-image-run-configuration.html) [Dockerfile run configuration](dockerfile-run-configuration.html) [Docker compose run configuration](docker-compose-run-configuration.html)

### Related

[Run/debug configurations](run-debug-configuration.html)

### Tutorials

[Run a database in a Docker container](running-a-dbms-image.html) [Dockerize a Java application](dockerize-java-app.html)

