Persistent Docker Environment for INFINI Console and Easysearch

Persistent Docker Environment for INFINI Console and Easysearch

Understanding Data Persistence in Docker Containers

When deploying INFINI Console (version 1.29.6 in this example) with Docker, users commonly encounter an issue: container restarts cause loss of previously configured system cluster connections. This problem typically stems from improper Docker data persistence configuration. The original Docker deployment example for INFINI Console was designed for simple testing without considering multiple restarts. The official documentation has since been updated; refer to: Container Deployment

Let's proceed with a local test.

Core Concept: Docker Containers and Data Persistence

By default, Docker container file systems are ephemeral. When a container is stopped and removed, any changes made inside that haven't been persisted are lost. INFINI Console stores its configuration in specific directories within the container. To preserve this information after container restarts or rebuilds, we must map these critical directories to persistent storage locations on the host machine.

Prerequisites

  • Operating System: macOS (used in this example)
  • Docker Environment: OrbStack (https://orbstack.dev/) or Docker Desktop for Mac.

Ensure Docker service is running and operational. Verify by running docker --version in your terminal.

docker --version
Docker version 25.0.5, build 5dc9bcc

Step 1: Create Local Persistence Directories and Custom Docker Network

First, create directories on the host machine to store configuration, data, and logs for both Console and Easysearch. Simultaneously, create a custom Docker network to enable communication between containers by name.

# 1. Create project root directory and persistence subdirectories for each service
mkdir -p ~/infini_persistent_setup/console/config ~/infini_persistent_setup/console/data ~/infini_persistent_setup/console/logs
mkdir -p ~/infini_persistent_setup/easysearch/config ~/infini_persistent_setup/easysearch/data ~/infini_persistent_setup/easysearch/logs
cd ~/infini_persistent_setup

# 2. Create a custom Docker bridge network
docker network create infini_network

infini_network is the name we've given to our custom network for these containers.

Step 2: Extract Initial Configuration Files

To facilitate first-time startup and subsequent customization, we'll extract default configuration files from the official Docker images to our locally created persistence directories.

1. INFINI Console (1.29.6) Initial Configuration

According to the INFINI Console official Docker documentation, configuration files are located at /config inside the container.

docker pull infinilabs/console:1.29.6
docker run --rm \
    -v $PWD/console/config:/temp_host_config \
    infinilabs/console:1.29.6 \
    sh -c "cp -a /config/. /temp_host_config/ && chmod -R ugo+rw /temp_host_config/"

2. INFINI Easysearch (1.13.0) Initial Configuration

Configuration files for INFINI Easysearch are located at /app/easysearch/config inside the image, and require an initial administrator password of INFINILabs01.

Important: Always set a secure password for Easysearch.

docker pull infinilabs/easysearch:1.13.0
docker run --rm \
    -e EASYSEARCH_INITIAL_ADMIN_PASSWORD="INFINILabs01" \
    -v $PWD/easysearch/config:/temp_host_config \
    infinilabs/easysearch:1.13.0 \
    sh -c "cp -a /app/easysearch/config/. /temp_host_config/ && chmod -R ugo+rw /temp_host_config/"

Your local console/config and easysearch/config directories should now contain the initial configuration files.

Directory structure should look like this:

tree -L 3 .
.
├── console
│   ├── config
│   │   ├── install_agent.tpl
│   │   ├── permission.
│   │   ├── setup
│   │   └── system_config.tpl
│   ├── data
│   └── logs
└── easysearch
    ├── config
    │   ├── admin.crt
    │   ├── admin.key
    │   ├── analysis-ik
    │   ├── ca.crt
    │   ├── ca.key
    │   ├── easysearch.yml
    │   ├── easysearch.yml.example
    │   ├── instance.crt
    │   ├── instance.key
    │   ├── jvm.options
    │   ├── jvm.options.d
    │   ├── log4j2.properties
    │   └── security
    ├── data
    └── logs

Step 3: Manually Run INFINI Easysearch Container

Use the docker run command to start Easysearch with port mapping, environment variables, and most importantly - volume mounting.

docker run -d \
--name easysearch_node \
--network infini_network \
-p 9200:9200 \
-p 9300:9300 \
-e cluster.name="infini_local_cluster" \
-e node.name="easysearch-node-01" \
-e cluster.initial_master_nodes="easysearch-node-01" \
-e "ES_JAVA_OPTS=-Xms1g -Xmx1g" \
-e EASYSEARCH_INITIAL_ADMIN_PASSWORD="INFINILabs01" \
-v $PWD/easysearch/config:/app/easysearch/config \
-v $PWD/easysearch/data:/app/easysearch/data \
-v $PWD/easysearch/logs:/app/easysearch/logs \
--ulimit memlock=-1:-1 \
--ulimit nofile=65536:65536 \
infinilabs/easysearch:1.13.0

Key Parameter Explanations:

  • --name easysearch_node: Assigns a name to the container.
  • --network infini_network: Connects to the custom network.
  • -p HOST_PORT:CONTAINER_PORT: Maps ports between host and container.
  • -e VARIABLE=VALUE: Sets environment variables.
  • -v $PWD/host/path:/container/path: The core of persistence. Maps subdirectories from the current working directory ($PWD) on the host to specified paths within the container.

Step 4: Manually Run INFINI Console Container

Now start the Console container with similar network, port, environment variable, and volume mount configurations.

docker run -d \
--name management_console \
--network infini_network \
-p 9000:9000 \
-v $PWD/console/config:/config \
-v $PWD/console/data:/data \
-v $PWD/console/logs:/log \
infinilabs/console:1.29.6

Check logs

docker logs -f easysearch_node
docker logs -f management_console

Step 5: Verify Services and Persistence

  1. Check container status: docker ps (should show easysearch_node and management_console)
  2. Access Console: Open http://localhost:9000 in your browser
  3. Perform initial configuration in Console
  4. Test persistence (restart Console container):
docker stop management_console
docker rm management_console
# Re-run the docker run command from Step 4 to start Console (ensure all parameters match)

Access Console again: Open http://localhost:9000. If everything works correctly, persistence has been successfully implemented.

Step 6: Stop and Cleanup (Optional)

  • Stop containers: docker stop management_console easysearch_node
  • Remove containers: docker rm management_console easysearch_node
  • Remove network: docker network rm infini_network
  • Remove local persistence data (if no longer needed):
rm -rf ~/infini_persistent_setup/console
rm -rf ~/infini_persistent_setup/easysearch

Tags: docker INFINI Console Easysearch data persistence containerization

Posted on Thu, 24 Sep 2026 16:21:10 +0000 by csaba