DevOps

Couchbase Docker Container

Couchbase Docker images are always at hub.docker.com/_/couchbase/. Complete instructions to run Couchbase Docker Container are available at docs.docker.com/engine/examples/couchbase/.

Start Couchbase Docker Container

How do you start a Couchbase Docker container?

docker run -d -p 8091-8093:8091-8093 -p 11210:11210 couchbase

By default, this command starts Couchbase Server 4.1 Enterprise Edition. The latest GA images are always available using this image name.

This server needs to be manually configured by going to the Web Console on http://<DOCKERHOST>:8091. The IP address of the Docker Host in my case is obtained using:

docker-machine ip couchbase

Pre-configured Couchbase Docker Container

If you want a pre-configured server, then you can run the image:

docker run -d -p 8091-8093:8091-8093 -p 11210:11210 arungupta/couchbase

This image is created using Dockerfile and configures the following:

  • Configures the memory
  • Configures Index, Query, and Data service
  • Sets up username/password credentials

Couchbase 4.5 Docker Container

Couchbase 4.5 Developer Preview was launched recently. It can run as a Docker container as:

docker run -d -p 8091-8093:8091-8093 -p 11210:11210 couchbase/server:enterprise-4.5.0-DP1
Unable to find image 'couchbase/server:enterprise-4.5.0-DP1' locally
enterprise-4.5.0-DP1: Pulling from couchbase/server
a64038a0eeaa: Pull complete 
2ec6e7edf8a8: Pull complete 
0a5fb6c3c94b: Pull complete 
a3ed95caeb02: Pull complete 
7d007592b256: Pull complete 
31cbaa6abb86: Pull complete 
efe43bf775c4: Pull complete 
e8fff3fce5e8: Pull complete 
2a747598893c: Pull complete 
Digest: sha256:873f2d8776d15019d8a45d01a2be5db345823b3093a3538970f1cd441c57d91c
Status: Downloaded newer image for couchbase/server:enterprise-4.5.0-DP1
b4ea7e969278b94fd9748003f7305e5ffcc30b398c6c6301982895550fd7fd24

Notice the image name is couchbase/server:enterprise-4.5.0-DP1.

The Couchbase Web Console is then accessible at http://<DOCKERHOST>:8091. The IP address of the Docker Host in my case is obtained using:

docker-machine ip couchbase

And so the Web Console looks like:

couchbase-4.5-developer-preview-docker-setup

After configuring the services, the Console looks like:

couchbase-4.5dp1-console-docker-1024x607

Pre-configured Couchbase 4.5 Docker Container

Now, if you want a pre-configured server, try this:

docker run -d -p 8091-8093:8091-8093 -p 11210:11210 arungupta/couchbase-server

This image is created using Dockerfile and configures the following:

  • Configures the memory
  • Configures Index, Query, Data, and Full-text service
  • Sets up username/password credentials

So, here are the images you need to use:

ImagePurpose
couchbase Last GA version of Couchbase
couchbase/server Intermediate builds of Couchbase, such as Developer Preview, Beta, etc
arungupta/couchbase Last GA version of Couchbase, pre-configured
arungupta/couchbase-server Intermediate builds of Couchbase, pre-configured

 
Easy, eh?

Reference: Couchbase Docker Container from our JCG partner Arun Gupta at the Miles to go 2.0 … blog.

Arun Gupta

Arun is a technology enthusiast, avid runner, author of a best-selling book, globe trotter, a community guy, Java Champion, JavaOne Rockstar, JUG Leader, Minecraft Modder, Devoxx4Kids-er, and a Red Hatter.
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Back to top button