• Products
  • Solutions
  • Customers
  • Resources
  • Company
  • Pricing
  • Download
Try Playground
  • NCache Docker on Linux
  • Create NCache Containers
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

Create Cache Containers for Linux Using Docker

Once you have set your Docker environment, you can now proceed to create containers for NCache Server images hosted on Docker Hub for Enterprise and Professional editions.

Pull NCache Docker Image

Execute the following command to pull the NCache Enterprise Server Docker Image for Linux.

docker pull alachisoft/ncache:latest-java

Refer to our Docker Hub repository to check out which other Docker images we provide.

Configure Custom Network

Before proceeding to create containers for NCache in Linux, you need to configure a custom network. By default, without the usage of a custom network, Docker assigns containers dynamic IP addresses on a container or host restart. A custom network will help assign your NCache containers static IP addresses.

Important

It is highly recommended to use static IPs for each container as all future connections will take place using this IP. These IPs should exist in the IP range specified in the custom network created.

NCache client-server connections are IP-based, and if this IP keeps on changing, the connection will break. So, we need to assign static IP addresses to our NCache containers. The following docker network create command creates a custom network called nbrg that contains subnet 10.2.0.4/16 and specifies the gateway as 10.2.0.1. You can change the values according to your environment.

docker network create --subnet=10.2.0.4/16 --gateway=10.2.0.1

Create Container from Image

Once you have pulled the NCache Docker image and created your custom network, you can create containers that host NCache and use them as cache servers. The container can be created with either the docker run or docker create command, the difference being docker run starts the container when it is created.

Note

While creating containers, the image specified should exist locally. If not, the image is then fetched from Docker Hub if the name of the repository is specified.

The following commands create the containers named ncache-ent-server-01 and ncache-ent-server-02 using the custom network nbrg and shipped image alachisoft/ncache:latest-java.

sudo docker run --name=ncache-ent-server-01 --net=nbrg --ip=10.2.0.4 -itd alachisoft/ncache:latest-java
sudo docker run --name=ncache-ent-server-02 --net=nbrg --ip=10.2.0.5 -itd alachisoft/ncache:latest-java

Your next step is to use the NCache containers that you just created, which is explained in the next chapter.

See Also

NCache Docker on Linux
NCache Docker on Windows
NCache Docker Deployment Scenarios

In This Article
  • Pull NCache Docker Image
  • Configure Custom Network
  • Create Container from 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