Merge pull request #2494 from LaurentGoderre/memcache-opts

Make memcached configuration section more generic
This commit is contained in:
Tianon Gravi 2024-10-10 11:22:39 -07:00 committed by GitHub
commit 6057581c1d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 21 additions and 3 deletions

View File

@ -12,12 +12,30 @@ Memcached's APIs provide a very large hash table distributed across multiple mac
$ docker run --name my-memcache -d %%IMAGE%% $ docker run --name my-memcache -d %%IMAGE%%
``` ```
## Setting Memory Usage ### Configuration
To customize the configuration of the memcached server, first obtain the upstream configuration options from the container:
```console ```console
$ docker run --name my-memcache -d %%IMAGE%% memcached -m 64 $ docker run --rm %%IMAGE%% -h
``` ```
This would set the Memcached server to use 64 megabytes for storage. Using `docker run`:
```console
$ docker run --name my-memcache -d %%IMAGE%% memcached --memory-limit=64
```
or using Docker Compose:
```yaml
services:
memcached:
image: %%IMAGE%%
command:
- --conn-limit=1024
- --memory-limit=64
- --threads=4
```
For infomation on configuring your memcached server, see the extensive [wiki](https://github.com/memcached/memcached/wiki). For infomation on configuring your memcached server, see the extensive [wiki](https://github.com/memcached/memcached/wiki).