Run Rancher CLI via Docker
mainYou can run the CLI using a Docker container. To provide authentication, you must mount your local cli2.json configuration file into the container at /home/cli/.rancher/cli2.json using a volume mount.
To build the rancher/cli Docker image, run make. To build using a custom repository name, use REPO=custom make to produce a custom/cli image.
docker run --rm -it -v <PATH_TO_CONFIG>:/home/cli/.rancher/cli2.json rancher/cli2 [ARGS]