Public | Automated Build

Last pushed: 16 hours ago
Short Description
Container for memcached - high-performance, distributed memory object caching system
Full Description

memcached

Memcached is High Performance, Distributed Memory Object Cache

How to use the container

Pull the image from Docker Hub:

$ sudo docker pull modularitycontainers/memcached

Run the container

docker run -it -p 11211:11211 --name memcached modularitycontainers/memcached

If you would like to increase a CACHE_SIZE use environment variable -e CACHE_SIZE:

docker run -it -e CACHE_SIZE=128 -p 11211:11211 --name memcached modularitycontainers/memcached

A demo

Here is a simple demo how to run memcached

  • Copy systemd service which will take care of memcached container:

     $ sudo cp -av memcached-container.service /usr/lib/systemd/system/
     $ sudo systemctl daemon-reload
    
  • We can start memcached now:

    $ sudo systemctl start memcached-container
    
  • You should be able to test memcached by commands (taken from http://www.journaldev.com/16/memcached-telnet-commands-with-example):

    set Test 0 100 10
    JournalDev
    STORED
    get Test
    VALUE Test 0 10
    JournalDev
    END
    replace Test 0 100 4
    Temp
    STORED
    get Test
    VALUE Test 0 4
    Temp
    END
    stats items
    STAT items:1:number 1
    STAT items:1:age 19
    STAT items:1:evicted 0
    STAT items:1:evicted_time 0
    STAT items:1:outofmemory 0
    STAT items:1:tailrepairs 0
    END
    flush_all
    OK
    get Test
    END
    version
    VERSION 1.4.25
    quit
    

Repository structure

  • Dockerfile - build container image with memcached.
  • openshift-template.yml - Template for OpenShift to memcached.
Docker Pull Command
Owner
modularitycontainers
Source Repository

Comments (0)