Docker is a platform for developing and running applications. With Docker, you can manage your infrastructure in the same way you manage your applications. You must have Docker installed on your computer. To verify your installation, run the following command:
Run the image
To use Docker, first use the following command to run the image:
docker run --rm -it -v ch-cli-data:/root/.ch-cli scr.sitecore.com/sch/ch-cli
This command is equivalent to executing the
ch-cli binary on your local computer and takes the same arguments.
--rminstructs Docker to remove the container after executing the command.
-itenables an interactive session. Required for CLI commands that take additional input.
-vspecifies a named volume to persist all configuration between container restarts. Instead of a named volume, this could also point to a local directory on your computer.
Update the image
Docker generally only downloads the image when it is first requested. To update the image to the latest version, run the following command:
docker pull scr.sitecore.com/sch/ch-cli:latest