• Products
  • Solutions
  • Customers
  • Resources
  • Company
  • Pricing
  • Download
Try Playground
Show / Hide Table of Contents

Cache Dockerfile for Linux

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 Linux distro from Ubuntu to Mint, 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 linux are placed at GitHub for the following:

    • NCache Enterprise Server for Linux
    • NCache Enterprise Client for Linux
  • NCache Enterprise .NET Core setup file: This is a .tar.gz file that can be downloaded from Alachisoft.com.

  • installncache.sh: The installncache.sh script extracts the NCache tar.gz and installs NCache at the installation path /opt.

    You can get the installncache.sh scripts from GitHub for the following:

    • Linux Enterprise Server installncache.sh
    • Linux Enterprise Client installncache.sh
  • ipbinding.sh: The ipbinding.sh script extracts the IP address of the container on the very first usage of container and updates that IP in the NCache configuration files accordingly.

    You can get the ipbinding.sh scripts from GitHub for the following:

    • Linux Enterprise Server ipbinding.sh
    • Linux Enterprise Client ipbinding.sh
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 NCache service not starting.

  • startup.sh: The startup script calls ipbinding.sh which replaces the IP with the actual IP assigned to the container on the first time the container is started. Furthermore, the startup.sh script starts ncached, ncacheloaderd and ncachebridged daemon services.

    You can get the startup.sh scripts from GitHub for the following editions:

    • Linux Enterprise Server startup.sh
    • Linux Enterprise Client startup.sh

These resources must be placed in the following file structure (as also arranged on GitHub). Make sure that the resources folder exists in the same directory as the Dockerfile.

  1. Dockerfile
  2. ipbinding.sh, startup.sh, installncache.sh, and ncache setup file 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 that 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 /opt/ncache/.

  2. The following docker build command creates image ncache with optional tag enterprise-server-linux-latest in the format <image_name>:<optional_tag>:

PS /opt/ncache/Docker> docker build . –t alachisoft/ncache:latest-java
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 alachisoft/ncache:latest-java to Docker Hub public repository:

docker push alachisoft/ncache:latest-java

See Also

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

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