Running Memcached with Docker
The official memcached image runs the server out of the box. docker run -d --name memcached -p 11211:11211 memcached publishes port 11211; verify with docker exec memcached memcached -V. Because Memcached is purely in-memory, there is nothing to persist and no volume to mount.
Tuning
Append flags after the image name (the image's entrypoint is memcached): for example docker run -d --name memcached -p 11211:11211 memcached memcached -m 256 -c 2048 sets a 256 MB cache and a higher connection limit.
Security
Publishing 11211 exposes an unauthenticated cache. On anything but an isolated network, bind the port to localhost (-p 127.0.0.1:11211:11211) or front it with a firewall, and avoid UDP exposure to prevent amplification abuse.