Skip to content

Commit 6057581

Browse files
authored
Merge pull request #2494 from LaurentGoderre/memcache-opts
Make memcached configuration section more generic
2 parents bdea808 + 062ed81 commit 6057581

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

memcached/content.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,30 @@ Memcached's APIs provide a very large hash table distributed across multiple mac
1212
$ docker run --name my-memcache -d %%IMAGE%%
1313
```
1414

15-
## Setting Memory Usage
15+
### Configuration
16+
17+
To customize the configuration of the memcached server, first obtain the upstream configuration options from the container:
1618

1719
```console
18-
$ docker run --name my-memcache -d %%IMAGE%% memcached -m 64
20+
$ docker run --rm %%IMAGE%% -h
1921
```
2022

21-
This would set the Memcached server to use 64 megabytes for storage.
23+
Using `docker run`:
24+
25+
```console
26+
$ docker run --name my-memcache -d %%IMAGE%% memcached --memory-limit=64
27+
```
28+
29+
or using Docker Compose:
30+
31+
```yaml
32+
services:
33+
memcached:
34+
image: %%IMAGE%%
35+
command:
36+
- --conn-limit=1024
37+
- --memory-limit=64
38+
- --threads=4
39+
```
2240
2341
For infomation on configuring your memcached server, see the extensive [wiki](https://github.com/memcached/memcached/wiki).

0 commit comments

Comments
 (0)