• Products
  • Solutions
  • Customers
  • Resources
  • Company
  • Pricing
  • Download
Try Playground
  • NCache Docker on Windows
  • NCache Dockerfile
Show / Hide Table of Contents
  • Getting Started Guide
  • NCache Docker on Windows
    • Create NCache Containers
    • Use NCache on Docker
    • NCache Dockerfile
  • NCache Docker on Linux
    • Create NCache Containers
    • Use NCache on Docker
    • NCache Dockerfile
  • NCache Docker Deployment Scenarios
  • Port Forwarding for NCache in Docker

Cache Dockerfile for Windows

NCache also provides Dockerfiles and supporting resources on GitHub to allow more flexibility while using the NCache Docker image. You can use these Dockerfiles to make a customized image with your customized dependencies to cater to your specific needs. For example, you want to change the version of Windows from Windows Server 2019 to 2016, you can make this change in the NCache Dockerfile and build a customized image.

What does NCache Dockerfile contain?

The Dockerfiles provided by NCache at GitHub contain commands to build images for NCache. Before you proceed any further, you need to clone this repo to your local machine and download the NCache setup and place it under the resource folder. Note that to create the image using this Dockerfile, the following resources are required:

  • Dockerfile: Dockerfiles can be customized to perform additional tasks. NCache Dockerfiles for Windows Server are placed at GitHub for the following:

    • NCache Enterprise Server
    • NCache Enterprise Client
  • NCache Enterprise setup file: This is an .msi file that can be downloaded from Alachisoft.com.

  • Startup.ps1: The Startup.ps1 script extracts the IP address of the container on the very first usage of the container and updates that IP in the NCache configuration files accordingly.

    You can get the Startup.ps1 scripts from GitHub for the following:

    • Enterprise Server Startup.ps1
    • Enterprise Client Startup.ps1
Important

In case dynamic IPs have been assigned, the container might be assigned a new IP address (on container or host restart) instead of the one stored in the configuration during container creation. This results in the NCache Service not starting.

These resources must be placed in the following file structure (as also arranged on GitHub):

  1. Dockerfile
  2. ncache setup file in the resource folder.
  3. Startup.ps1 in the resource folder.

Customize Dockerfile

You can customize the NCache Dockerfile as per your requirement to perform any additional tasks after or before installation. You can then create your customized images using this Dockerfile and push them to Docker Hub or your local repository. All of this is explained below:

Create Images using Customized Dockerfile

Using your customized Dockerfile, you can now create Docker images which will host NCache as specified in Dockerfile.

  1. Go to the relative path where the Dockerfile is placed. In the following examples, it is assumed it is placed in location C:/Docker.

  2. The following docker build command creates image ncache with optional tag alachisoft/ncache:latest in the format <image_name>:<optional_tag>:

PS C:/Docker> docker build . –t alachisoft/ncache:latest
Important

Similarly, if you want to use the OutProc cache on the client container or you want to monitor NCache Client Counters, you can build the NCache Enterprise Client image using the same process.

Note

To verify that the image has been created, run the command docker images that lists all images and their details.

Push Image

Once your customized Docker Image(s) has been created, you can push it to a public or local registry using the docker push command. The following command pushes the image ncache with the tag latest to Docker Hub public repository:

docker push alachisoft/ncache:latest

See Also

Create Containers in Windows
NCache Docker on Windows
NCache Docker on Linux

In This Article
  • What does NCache Dockerfile contain?
  • Customize Dockerfile
    • Create Images using Customized Dockerfile
    • Push Image
  • See Also

Contact Us

PHONE

+1 (214) 764-6933   (US)

+44 20 7993 8327   (UK)

 
EMAIL

sales@alachisoft.com

support@alachisoft.com

NCache
  • NCache Enterprise
  • NCache Professional
  • Edition Comparison
  • NCache Architecture
  • Benchmarks
Download
Pricing
Try Playground

Deployments
  • Cloud (SaaS & Software)
  • On-Premises
  • Kubernetes
  • Docker
Technical Use Cases
  • ASP.NET Sessions
  • ASP.NET Core Sessions
  • Pub/Sub Messaging
  • Real-Time ASP.NET SignalR
  • Internet of Things (IoT)
  • NoSQL Database
  • Stream Processing
  • Microservices
Resources
  • Magazine Articles
  • Third-Party Articles
  • Articles
  • Videos
  • Whitepapers
  • Shows
  • Talks
  • Blogs
  • Docs
Customer Case Studies
  • Testimonials
  • Customers
Support
  • Schedule a Demo
  • Forum (Google Groups)
  • Tips
Company
  • Leadership
  • Partners
  • News
  • Events
  • Careers
Contact Us

  • EnglishChinese (Simplified)FrenchGermanItalianJapaneseKoreanPortugueseSpanish

  • Contact Us
  •  
  • Sitemap
  •  
  • Terms of Use
  •  
  • Privacy Policy
© Copyright Alachisoft 2002 - 2025. All rights reserved. NCache is a registered trademark of Diyatech Corp.
Back to top