ubuntu/memcached
Memcached, in-memory keyvalue store for small data chunks. Long-term tracks maintained by Canonical.
50K+
Current Memcached Docker Image from Canonical, based on Ubuntu. Receives security updates and tracks the newest combination of Memcached and Ubuntu. This repository is free to use and exempted from per-user rate limits.
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. It is a short-term memory for applications. Memcached allows to take memory from parts of a system where you have more than you need and make it accessible to areas where you have less than you need. Read more on the memcached website.
Up to 5 years free security maintenance on LTS channels.
Up to 10 years customer security maintenance
from canonical/memcached
. Request access.
Tags in italics are not available in ubuntu/memcached but are shown here for completeness.
Channel Tag | Currently | Architectures | ||
---|---|---|---|---|
1.6-22.04_beta | Memcached 1.6 on Ubuntu 22.04 LTS | amd64 , arm64 , ppc64el , s390x | ||
1.5-20.04_beta | ![]() | Memcached 1.5.22 on Ubuntu 20.04 LTS | amd64 , arm64 , ppc64el , s390x | |
track_risk |
Channel Tag shows the most stable channel for that track. A track is a combination of both the application version and the underlying Ubuntu series, eg 1.0-22.04
.
Channels are ordered from the most stable to the least stable
, candidate
, beta
, edge
.
More risky channels are always implicitly available.
So if beta
is listed, you can also pull edge
. If candidate
is listed, you can pull beta
and edge
.
When stable
is listed, all four are available.
Images are guaranteed to progress through the sequence edge
, beta
, candidate
before stable
.
If your usage includes commercial redistribution or requires unavailable channels/versions, please get in touch with the Canonical team (or using rocks@canonical.com).
Launch this image locally:
docker run -d --name memcached-container -e TZ=UTC ubuntu/memcached:1.6-22.04_beta
Parameters
Parameter | Description |
---|---|
-e TZ=UTC | Timezone. |
-e MEMCACHED_CACHE_SIZE=64MB | Determines the size of the cache. |
-e MEMCACHED_MAX_CONNECTIONS=1024 | Determines the maximum number of concurrent connections. |
-e MEMCACHED_THREADS=4 | Determines the number of threads to process requests. |
-e MEMCACHED_PASSWORD | Define the password for the root user if another username is provided. By default the authentication is disabled but if this option is passed it becomes enabled. |
-e MEMCACHED_USERNAME | Define a new user. If this option is passed a password is needed to authenticate the new user. |
-p 11211:11211 | Memcached is exposed inside the container on port 11211 . |
Testing/Debugging
To debug the container:
docker logs -f memcached-container
To get an interactive shell:
docker exec -it memcached-container /bin/bash
# Create a dedicated network
$ docker network create memcached-network
# Connect the main container to it
$ docker network connect memcached-network memcached-container
# Run an interactive container with the latest Ubuntu
$ docker run -it --rm --name telnet --network memcached-network ubuntu bash
# Install the telnet cli from within the container
> apt update && apt install telnet -y
# Connect to the memcached instance using telnet
> telnet memcached-container 11211
Trying 172.30.0.2...
Connected to memcached.
Escape character is '^]'.
From there you can run memcached
commands, as documented in their wiki.
$ telnet memcached-container 11211
There are cases where one might want to pass some memcached command line flags that are not configurable via environment variables. In this case you can append the flags themselves or a shell script to the run command.
Works with any Kubernetes; if you don't have one, we recommend you install MicroK8s and microk8s.enable dns storage
then snap alias microk8s.kubectl kubectl
.
Download
memcached-deployment.yml and set containers.memcached.image
in memcached-deployment.yml
to your chosen channel tag (e.g. ubuntu/memcached:1.6-22.04_beta
), then:
kubectl apply -f memcached-deployment.yml
Memcached will be listening on port 31211
in your host.
If you find a bug in our image or want to request a specific feature, please file a bug here:
https://bugs.launchpad.net/ubuntu-docker-images/+filebug
Please title the bug "memcached: <issue summary>
". Make sure to include the digest of the image you are using, from:
docker images --no-trunc --quiet ubuntu/memcached:<tag>
These channels (tags) are not updated anymore. Please upgrade to newer channels, or reach out if you can't upgrade.
Track | Version | EOL | Upgrade Path |
---|---|---|---|
Memcached 1.6.9 on Ubuntu 21.10 | 07/2022 | 1.6-22.04_beta | |
Memcached 1.6.9 on Ubuntu 21.04 | 01/2022 | ||
track |
docker pull ubuntu/memcached