Public Repository

Last pushed: 2 years ago
Short Description
Container Docker with Redis + Mysqld + CouchBase
Full Description

Tags
1.X : Redis 2.8 - Mysqld 5.6 - CouchBase 3.0.1 (community).
Shared /data/mysql/ with log, lib and run library.
You can put your sql file in shared library (ex:/data/mysql/sql) et run this container with "-e STARTUP_SQL=/data/mysql/sql"

Prerequisites

For most people the default docker installation will be fine and in fact you can just proceed with the presumption you are fine and run the the image and see if it starts. If you're watching the couchbase build process carefully you will see couchbase's installation throw a warning about:

/opt/couchbase/etc/couchbase_init.d: 47: ulimit: error setting limit (Operation not permitted)
While this may seem like a potential problem it is a red herring. What it's trying to do is allocated itself proper headroom for memory and open files (as Couchbase is a big consumer of both) but programs that run under upstart are regulated by their configuration in the /etc/config directory and in turn containers that run under Docker inherit limits set by the docker.conf file (if you have one … some distros don't). While it can't allocate the headroom directly itself it is likely that Docker is already asking for enough resources to share with your couchbase container. Memory, for instance, is unlimited.

Here is what has been historically recommended for the /etc/init/docker.conf file in other couchbase Dockerfile's i've seen:

limit memlock unlimited unlimited
limit nofile 262144
For most people the “nofile” limit is actually LESS than what docker asks for (Docker may have histically asked for less?). Anyway, do not move downward from any limit set. As already stated, typically memory is NOT limited by Docker but if it is you can change it to how it is represented above (or just remove it completely).

If you had to make any changes, you'll need to restart the docker daemon. On modern Ubuntu versions this is managed by upstart so you should just type sudo service docker restart, if you're not using upstart then try: /etc/init.d/docker restart.

Run

interactive Mode
docker run -ti -v /data/mysql:/data/mysql --rm --name=MRC -p 6379:6379 -p 8091:8091 -p 8092:8092 -p 11210:11210 -p 11211:11211 -p 3306:3306 jfgrimault/mysqld-redis-couchbase:1.0

daemons mode
docker run -d -v /data/mysql:/data/mysql --name=MRC -p 6379:6379 -p 8091:8091 -p 8092:8092 -p 11210:11210 -p 11211:11211 -p 3306:3306 jfgrimault/mysqld-redis-couchbase:1.0

MYSQL CLIENT

mysql -S/data/mysql/run/mysqld.sock -uroot

Docker Pull Command
Owner
jfgrimault