Skip to content

Latest commit

 

History

History
80 lines (61 loc) · 1.34 KB

README.md

File metadata and controls

80 lines (61 loc) · 1.34 KB

Intro

This repository contains the the Dockerfile and script to generate a Couchbase server without having to use the Web UI.

Building

docker build -t rugolini/couchbase-server-nosetup .

Pulling the image

docker pull rugolini/couchbase-server-nosetup

Running

Run container

# Run container
docker run -ti --name couchbase-server-nosetup \
  -h node1.cluster \
  -p 8091-8093:8091-8093 \
  -p 11210:11210 \
  -p 4369:4369 \
  -p 21100-21299:21100-21299 \
  rugolini/couchbase-server-nosetup

Run in cluster

Create network

docker network create couchbase

Create node1

# Create node1
docker run -ti --name node1.cluster \
  -p 8091-8093:8091-8093 \
  -p 11210:11210 \
  -p 4369:4369 \
  -p 21100-21299:21100-21299 \
  -h node1.cluster \
  --network=couchbase \
  rugolini/couchbase-server-nosetup

joining node2 to node1

Rebalancing automatically

# Joining node1
docker run -ti --name node2.cluster \
  --network=couchbase \
  -h node2.cluster \
  -e CLUSTER_HOST=node1.cluster \
  -e CLUSTER_REBALANCE=true \
  rugolini/couchbase-server-nosetup

joining node3 to node1

Rebalancing manually

# Joining node1
docker run -ti --name node3.cluster \
  --network=couchbase \
  -h node3.cluster \
  -e CLUSTER_HOST=node1.cluster \
  rugolini/couchbase-server-nosetup