The memcached container
  • Dockerfile 46.3%
  • Roff 38.3%
  • Shell 15.4%
Find a file
2017-09-06 12:15:32 +02:00
files Update container image according to Fedora-Dockerfiles 2017-09-06 12:15:32 +02:00
root sync with upstream 2017-08-21 17:02:11 +02:00
.gitignore Initial setup of the repo 2017-04-11 12:31:12 +00:00
Dockerfile Update container image according to Fedora-Dockerfiles 2017-09-06 12:15:32 +02:00
help.md Update container image according to Fedora-Dockerfiles 2017-09-06 12:15:32 +02:00
memcached-container.service Initial import (#1436970) 2017-04-12 08:48:51 +02:00
openshift-template.yml Initial import (#1436970) 2017-04-12 08:48:51 +02:00
README.md Update container image according to Fedora-Dockerfiles 2017-09-06 12:15:32 +02:00
sources Initial setup of the repo 2017-04-11 12:31:12 +00:00

memcached

Memcached is High Performance, Distributed Memory Object Cache

How to use the container

Pull the image from Docker Hub:

$ sudo docker pull registry.fedoraproject.org/memcached:rawhide

Run the container

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

If you would like to debug memcached, use container option =e MEMCACHED_DEBUG_MODE:

docker run -it -p 11211:11211
[-e MEMCACHED_DEBUG_MODE]
--name memcached modularitycontainers/memcached

If you would like to change memcached options, like cache_size, connections or threads, use environment variable -e MEMCACHED_CACHE_SIZE, -e MEMCACHED_CONNECTIONS, -e MEMCACHED_THREADS respectively:

docker run -it -p 11211:11211
[-e MEMCACHED_CACHE_SIZE=<size_in_MB>]
[-e MEMCACHED_CONNECTIONS=<max_simultaneous_connections>]
[-e MEMCACHED_THREADS=<max_concurrent_threads>]
--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.