Skip to content

Commit

Permalink
Make memcached configuration section more generic
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentGoderre committed Oct 10, 2024
1 parent 1662b9b commit 2f64725
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions memcached/content.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,31 @@ Memcached's APIs provide a very large hash table distributed across multiple mac
$ 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
$ docker run --rm %%IMAGE%% -h
```

Using `docker run`:

```console
$ docker run --name my-memcache -d %%IMAGE%% memcached -m 64
docker run --name my-memcache -d %%IMAGE%% memcached:alpine --memory-limit=64
```

This would set the Memcached server to use 64 megabytes for storage.
or using Docker Compose:

```yaml
services:
memcached:
image: %%IMAGE%%:alpine
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).

0 comments on commit 2f64725

Please sign in to comment.