Dev Container CLI
A Dev Container is available as a CLI tool that you can download as ZIP archive containing the JAR file and run a Dev Container from the terminal.
Prerequisites
Before starting to configure the Dev Container CLI, ensure the following prerequisites are met:
The ZIP distribution requires JDK 17 or newer to be installed.
The project for which you want to build a Dev Container must contain a
.devcontainer
directory withdevcontainer.json
file.
Configure CLI
Install and run Dev Container CLI
Download and unpack the
.zip
file using the following command:curl -f -L -o intellij-devcontainers-cli.zip "https://jb.gg/intellij-devcontainers-cli.zip/latest"Check the following example link to the deployed distribution:
https://download.jetbrains.com/resources/intellij/dev-containers/243.19420.43/intellij-devcontainers-cli.zipIn the terminal, locate the
ijcdev
script file.Run the script from the current directory using the following command:
./ijdevcThe
ijdevc
script file contains the following parameters:SOURCE
: a directory to a project where thedevcontainer.json
file is located.config
: defines a path to adevcontainer.json
file.format
: structures the output for clearer representation.
Build Dev Container
Execute the script with the
config
parameter and a local path to the project'sdevcontainer.json
file.Run the following command:
./ijdevc --config /full/path/to/project/.devcontainer/devcontainer.json /full/path/to/projectCheck the following example:
./ijdevc --config /Users/jetbrains/spring-petclinic/.devcontainer/devcontainer.json /Users/jetbrains/spring-petclinicThe output of the script is the built of the Dev Container that is portable and can be distributed to vendors. It is also displayed in the IDE.