Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
Run Salesforce CLI Using a Docker Image
For each Salesforce CLI version, we provide two flavors:
- slim—The CLI installed on Linux with a TAR file, plus OpenJDK 11.
- full—The CLI installed on Linux with npm on a full Node.js installation, plus OpenJDK 11 and additional utilities such as jq.
Refer to this Web page or the following table to determine the name of the image you want to use.
| Salesforce CLI Version Type | Docker Hub Image Name |
|---|---|
| Slim latest release | salesforce/cli:latest-slim |
| Full latest release | salesforce/cli:latest-full |
| Slim release candidate | salesforce/cli:latest-rc-slim |
| Full release candidate | salesforce/cli:latest-rc-full |
| Slim specific version, such as 2.0.1 | salesforce/cli:2.0.1-slim |
| Full specific version, such as 2.0.1 | salesforce/cli:2.0.1-full |
For example, to pull and run the slim CLI release candidate image:
1docker pull salesforce/cli:latest-rc-slim
2docker run -it salesforce/cli:latest-rc-slimThen you can run Salesforce CLI commands, such as:
1sf versionTo exit the Salesforce CLI Docker container:
1exitYou can also remotely execute commands from outside the container after you have it running and know the container ID:
1docker exec -it 8b1e2696a243 bin/bash sf version