Bitnami Secure Image for memcached
100M+
Memcached is an high-performance, distributed memory object caching system, generic in nature, but intended for use in speeding up dynamic web applications by alleviating database load.
Overview of Memcached Trademarks: This software listing is packaged by Bitnami. The respective trademarks mentioned in the offering are owned by the respective companies, and use of them does not imply any affiliation or endorsement.
docker run --name memcached REGISTRY_NAME/bitnami/memcached:latest
Note: You need to substitute the
REGISTRY_NAMEplaceholder with a reference to your container registry.
Deploying Bitnami applications as Helm Charts is the easiest way to get started with our applications on Kubernetes. Read more about the installation in the Bitnami Memcached Chart GitHub repository.
Non-root container images add an extra layer of security and are generally recommended for production environments. However, because they run as a non-root user, privileged tasks are typically off-limits. Learn more about non-root containers in our docs.
Dockerfile linksLearn more about the Bitnami tagging policy and the difference between rolling tags and immutable tags in our documentation page.
The recommended way to get the Bitnami Memcached Docker Image is to pull the prebuilt image from the Docker Hub Registry.
docker pull REGISTRY_NAME/bitnami/memcached:latest
To use a specific version, you can pull a versioned tag. You can view the list of available versions in the Docker Hub Registry.
docker pull REGISTRY_NAME/bitnami/memcached:[TAG]
If you wish, you can also build the image yourself by cloning the repository, changing to the directory containing the Dockerfile and executing the docker build command. Remember to replace the APP, VERSION and OPERATING-SYSTEM path placeholders in the example command below with the correct values.
git clone https://github.com/bitnami/containers.git
cd bitnami/APP/VERSION/OPERATING-SYSTEM
docker build -t REGISTRY_NAME/bitnami/APP:latest .
docker-compose.yamlPlease be aware this file has not undergone internal testing. Consequently, we advise its use exclusively for development or testing purposes. For production-ready deployments, we highly recommend utilizing its associated Bitnami Helm chart.
Using Docker container networking, a Memcached server running inside a container can easily be accessed by your application containers.
Containers attached to the same network can communicate with each other using the container name as the host name.
The following sections describe environment variables and related settings.
The following tables list the main variables you can set.
| Name | Description | Default Value |
|---|---|---|
MEMCACHED_LISTEN_ADDRESS | Host that the Memcached service will bind to. | nil |
MEMCACHED_PORT_NUMBER | Port number used by Memcached. | 11211 |
MEMCACHED_USERNAME | Memcached admin username. | root |
MEMCACHED_PASSWORD | Password for the Memcached admin user. | nil |
MEMCACHED_MAX_ITEM_SIZE | Memcached maximum item size. | nil |
MEMCACHED_EXTRA_FLAGS | Extra flags to be used when running Memcached. | nil |
MEMCACHED_MAX_TIMEOUT | Maximum timeout in seconds for Memcached to start or stop. | 5 |
MEMCACHED_CACHE_SIZE | Memcached cache size in MB. | nil |
MEMCACHED_MAX_CONNECTIONS | Maximum amount of concurrent connections that Memcached will tolerate. | nil |
MEMCACHED_THREADS | Amount of process threads that Memcached will use. | nil |
| Name | Description | Value |
|---|---|---|
MEMCACHED_BASE_DIR | Memcached installation directory. | ${BITNAMI_ROOT_DIR}/memcached |
MEMCACHED_CONF_DIR | Memcached configuration directory. | ${MEMCACHED_BASE_DIR}/conf |
MEMCACHED_DEFAULT_CONF_DIR | Memcached configuration directory. | ${MEMCACHED_BASE_DIR}/conf.default |
MEMCACHED_BIN_DIR | Memcached directory for binary executables. | ${MEMCACHED_BASE_DIR}/bin |
SASL_CONF_PATH | Memcached SASL configuration directory. | ${MEMCACHED_CONF_DIR}/sasl2 |
SASL_CONF_FILE | Memcached SASL configuration | ${SASL_CONF_PATH}/memcached.conf |
SASL_DB_FILE | Memcached SASL database file. | ${SASL_CONF_PATH}/memcachedsasldb |
MEMCACHED_DAEMON_USER | Memcached system user. | memcached |
MEMCACHED_DAEMON_GROUP | Memcached system group. | memcached |
By default, the Bitnami Memcached container will not specify any cache size and will start with Memcached defaults (64MB). You can specify a different value with the MEMCACHED_CACHE_SIZE environment variable (in MB).
By default, the Bitnami Memcached container will not specify any maximum number of concurrent connections and will start with Memcached defaults (1024 concurrent connections). You can specify a different value with the MEMCACHED_MAX_CONNECTIONS environment variable.
By default, the Bitnami Memcached container will not specify the amount of threads for which to process requests for and will start with Memcached defaults (4 threads). You can specify a different value with the MEMCACHED_THREADS environment variable.
By default, the Memcached container will not specify any max item size and will start with Memcached defaults (1048576 ~ 1 megabyte). You can specify a different value with the MEMCACHED_MAX_ITEM_SIZE environment variable. Only numeric values are accepted - use 8388608 instead of 8m
Authentication on the Memcached server is disabled by default. To enable authentication, specify the password for the Memcached admin user using the MEMCACHED_PASSWORD environment variable (or in the content of the file specified in MEMCACHED_PASSWORD_FILE).
To customize the username of the Memcached admin user, which defaults to root, the MEMCACHED_USERNAME variable should be specified.
NOTE The default value of the
MEMCACHED_USERNAMEisroot.
Passing extra command-line flags to the Memcached service command is possible by adding them as arguments to run.sh script:
docker run --name memcached REGISTRY_NAME/bitnami/memcached:latest /opt/bitnami/scripts/memcached/run.sh -vvv
Alternatively, modify the docker-compose.yml file present in this repository:
services:
memcached:
...
command: /opt/bitnami/scripts/memcached/run.sh -vvv
...
Refer to the Memcached man page for the complete list of arguments.
In order to load your own SASL configuration file, you will have to make them available to the container. You can do it doing the following:
By default, when authentication is enabled the SASL configuration of Memcached is written to /opt/bitnami/memcached/sasl2/memcached.conf file with the following content:
mech_list: plain
sasldb_path: /opt/bitnami/memcached/conf/memcachedsasldb
The /opt/bitnami/memcached/conf/memcachedsasldb is the path to the sasldb file that contains the list of Memcached users.
The Bitnami Memcached Docker image from the Bitnami Secure Images catalog includes extra features and settings to configure the container with FIPS capabilities. You can configure the next environment variables:
OPENSSL_FIPS: whether OpenSSL runs in FIPS mode or not. yes (default), no.The Bitnami Memcached Docker image sends the container logs to the stdout. To view the logs:
docker logs memcached
or using Docker Compose:
docker-compose logs memcached
You can configure the containers logging driver using the --log-driver option if you wish to consume the container logs differently. In the default configuration docker uses the json-file driver.
The following subsections describe notable changes.
1.5.18-debian-9-r6 and 1.5.18-ol-7-r7 (#62).rootfs/ folder./opt/bitnami/memcached/conf/sasl2/ instead of /bitnami/memcached/conf/.MEMCACHED_PASSWORD_FILE.root user and the Memcached daemon was started as memcached user. From now on, both the container and the Memcached daemon run as user 1001.
As a consequence, the user running the Memcached process can write to the configuration files.MEMCACHED_USER parameter has been renamed to MEMCACHED_USERNAME.stdout and are no longer collected in the volume.Copyright © 2026 Broadcom. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Content type
Image
Digest
sha256:108dbaaa4…
Size
7.8 kB
Last updated
about 11 hours ago
Requires Docker Desktop 4.37.1 or later.
Pulls:
11,095
Last week