Use NCache on Docker for Windows Server
Once the containers for NCache are created and started, you need to connect to the container and can use NCache using PowerShell cmdlets.
Connect to Container
Once the containers are created, you can access these containers remotely, by using
command and specifying the container name of the newly created container. The
get-container command returns the container ID which is used as a value for
Enter-PSSession -ContainerId (get-container -Name ContainerName).ID –RunAsAdministrator
You will be directed to the container instance and can seamlessly perform NCache tasks through this container.
Use NCache in Container
Once connected to the container, you can perform administrative tasks through NCache PowerShell commands. This includes managing caches, clusters, security and deploying providers and much more.
For starters, you can verify NCache installation through
cmdlet. This lists the NCache version detail along with licensing information.
You can proceed to using NCache within Docker now.
For example, the following commands perform the following tasks:
- Import NCache PowerShell module.
- Displays status of the NCache service.
- Get caches detail.
- Start cache "mypartitionedcache", a default cache.
Import-Module ncacheps Get-Service -Name "NCacheSvc" Get-Caches -Detail Start-Cache -CacheName mypartitionedcache