Docker
Version: 3.4
Docker is an open platform for developing and running applications. With Docker, you can manage your infrastructure in the same ways you manage your applications.
This section contains the following:
Prerequisites
You must have Docker installed on your machine. To verify your installation run the following command:
RequestResponse
docker --version
If the command fails go to the Docker website and follow installation instructions.
Run the image
RequestResponse
docker run --rm -it -v ch-cli-data:/root/.ch-cli scr.sitecore.com/sch/ch-cli
Command breakdown
docker run --rm -it -v ch-cli-data:/root/.ch-cli scr.sitecore.com/sch/ch-cli
is equivalent to executing thech-cli
binary on your local computer and takes the same arguments.--rm
instructs Docker to remove the container after executing the command.-it
enables an interactive session. Required for CLI commands that take additional input.-v
specifies 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, execute the following:
RequestResponse
docker pull scr.sitecore.com/sch/ch-cli:latest