Docker run configurations
JetBrains Fleet has run configurations for the following Docker commands:
Builds an image from a Dockerfile. For more information about the command, refer to the official Docker documentation.
Press ⌘ R. In the popup that appears, select Create Run Configurations.
.fleet/run.json opens. This file contains the definitions for the run configurations in the workspace. The file uses JSON format.
In the
configurations
array, define an object with thetype
property set todocker-build
and provide the following information in it:name
A human-readable name that identifies the run configuration
file
The path or the URL of the Dockerfile to build.
buildOptions
(optional)The options supplied to the
build
command.For example:
{ "configurations": [ { "type": "docker-build", "name": "build my web app", "file": "$PROJECT_DIR$/Dockerfile", "buildOptions": "-t example-node-app" } ] }
Runs an image in a container. For more information about the command, refer to the official Docker documentation.
Press ⌘ R. In the popup that appears, select Create Run Configurations.
.fleet/run.json opens. This file contains the definitions for the run configurations in the workspace. The file uses JSON format.
In the
configurations
array, define an object with thetype
property set todocker-run
and provide the following information in it:name
A human-readable name that identifies the run configuration
imageIdOrName
Specify the image to run the container for.
runOptions
(optional)The options supplied to the
run
command.For example:
{ "configurations": [ { "type": "docker-run", "name": "run my web app", "imageIdOrName": "example-node-app", "runOptions": "-p80:3000" } ] }
Starts multiple services. For more information about the command, refer to the official Docker documentation.
Press ⌘ R. In the popup that appears, select Create Run Configurations.
.fleet/run.json opens. This file contains the definitions for the run configurations in the workspace. The file uses JSON format.
In the
configurations
array, define an object with thetype
property set todocker-compose-up
and provide the following information in it:name
A human-readable name that identifies the run configuration
files
The Compose files that define the services. The same as
-f
option.services
(optional)The services to build, create, and start. Use this option if you want to only start a part of the defined services.
upOptions
(optional)The options supplied to the
docker compose up
command.For example:
{ "configurations": [ { "type": "docker-compose-up", "name": "", "files": ["$PROJECT_DIR$/frontend/docker-compose.yml","$PROJECT_DIR$/backend/docker-compose.yml"], "services": ["example", "mysql"], "upOptions": "-d" } ] }