Closed VictorKrasnov closed 11 months ago
Does memcached itself support those environment variables? (We don't add any extra behavior here for handling environment variables like in some other images.)
I guess https://github.com/memcached/memcached/wiki/ConfiguringServer#inspecting-running-configuration is probably the best way to check if your settings are actually working, but we don't add anything extra above what memcached itself does in this regard.
Tianon, it was just example. Memcached doesn't support it. But a lot of images supports something like this.
I have found the solution myself. The correct docker-compose.yml file is:
version: '3'
services:
memcached:
image: memcached:alpine
restart: always
command: "-c ${MEMCACHED_CONN_LIMIT} -m ${MEMCACHED_MEMORY_LIMIT} -t ${MEMCACHED_THREADS}"
I think this example or some more examples how to use docker-entrypoint should be written in README.md.
There's, uh, not much to document in our docker-entrypoint.sh
script:
I think this example or some more examples how to use docker-entrypoint should be written in README.md.
I agree with you (even though ticket this was closed); your example was all that I needed to push me in the right direction, so thank you for sharing it.
It took way longer than it should have to figure out how to do this, due to a bunch of half-complete examples that popped up first with a google docker-compose memcached log
.
I maybe should have tried chatgpt first, but I tried it after and it suggested something that doesn't even appear to be remotely correct. Hopefully the next person that tries to configure memcached for docker compose to customize the arguments will stumble upon this post
Please add readme with docker-compose examples to configure settings like below:
And how to check does it work or not.