Skip to content

Docker recipe to build a Memcached image

License

Notifications You must be signed in to change notification settings

fscm/docker-memcached

Repository files navigation

Memcached for Docker

A small Memcached image that can be used to start a Memcached server.

Supported tags

What is Memcached?

Memcached is an in-memory key-value store for small chunks of arbitrary data (strings, objects) from results of database calls, API calls, or page rendering.

from memcached.org

Getting Started

There are a couple of things needed for the script to work.

Prerequisites

Docker, either the Community Edition (CE) or Enterprise Edition (EE), needs to be installed on your local computer.

Docker

Docker installation instructions can be found here.

Usage

To start a container with this image use the following command:

docker container run --rm --interactive --tty fscm/memcached [memcached_options]

To view a list of all of the available options use the following command:

docker container run --rm --interactive --tty fscm/memcached --help

Starting a Memcached Server

The quickest way to start a Memcached server is with the following command:

docker container run --detach --publish 11211:11211/tcp --name my_memcached fscm/memcached

To run the Memcached server as a non-root user use the --user option from Docker, like so:

docker container run --user $(id -u):$(id -g) --detach --publish 11211:11211/tcp --name my_memcached fscm/memcached

Stop the Memcached Server

If needed the Memcached server can be stopped and later started again (as long as the command used to perform the initial start did not included the --rm option).

To stop the server use the following command:

docker container stop CONTAINER_ID

To start the server again use the following command:

docker container start CONTAINER_ID

Build

Build instructions can be found here.

Versioning

This project uses SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Frederico Martins - fscm

See also the list of contributors who participated in this project.

About

Docker recipe to build a Memcached image

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published