JetBrains Fleet 1.42 Help

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.

  1. Press ⌘ R. In the popup that appears, select Create Run Configurations.

    Create Run Configurations option in the Run and Debug popup

    .fleet/run.json opens. This file contains the definitions for the run configurations in the workspace. The file uses JSON format.

  2. In the configurations array, define an object with the type property set to docker-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.

  1. Press ⌘ R. In the popup that appears, select Create Run Configurations.

    Create Run Configurations option in the Run and Debug popup

    .fleet/run.json opens. This file contains the definitions for the run configurations in the workspace. The file uses JSON format.

  2. In the configurations array, define an object with the type property set to docker-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.

  1. Press ⌘ R. In the popup that appears, select Create Run Configurations.

    Create Run Configurations option in the Run and Debug popup

    .fleet/run.json opens. This file contains the definitions for the run configurations in the workspace. The file uses JSON format.

  2. In the configurations array, define an object with the type property set to docker-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" } ] }
Last modified: 11 October 2024