Containerising the Nutanix CLI is my first post related to Nutanix technology since I joined the HCI leader a week ago. As company laptop I chose the Apple MBP, I want to try it for first time. So far so good, even I can have Docker “natively” running on it.
Always when I get a new computer I try to keep everything as much organised as I can. For my daily job I need to connect into many Nutanix clusters, so I prefer to use the Nutanix CLI (a.k.a. nCLI) and avoid jumping into the CVM(s).
As I said, I try to keep everything clean and organised, reason I have decided to run the nCLI as a container and not be messing up with the Java JRE and PATHS.
Containerising the Nutanix CLI
Containerising the Nutanix CLI is a straightforward task. I have not created a Docker image yet because I’m pending to confirm if the nCLI can be repackaged. But this is not a problem at all, you can build your own Docker image following the steps on my GitHub repo.
They are pretty straightforward. In a nutshell:
- Download the ncli.zip from Prism.
- Clone the GitHub repo.
- Build the Docker image.
- Run the nCLI as a container.
Disclaimer: Containerised nCLI is not officially supported by Nutanix. Please use at your own risk.