The memory ceiling is visible on a running container too. The machine has three containers created with different options.
Compare three containers
Look at the list of running containers, then at a single snapshot of their usage in docker stats.
First, predict
cron was created without the --memory option. What will docker stats show for it in the LIMIT column?
Now start the exercise, run the command and compare your prediction with the output.
docker stats is a usage table for each running container: the CPU share CPU %, the memory MEM USAGE and the ceiling LIMIT. Without options it keeps updating on screen until you press Ctrl+C; --no-stream prints a single snapshot.
api's ceiling is 64MiB, from its --memory 64m. cron has no limit, and its LIMIT says 458.2MiB — all of the machine's memory. Such a container can take memory the other services need. When memory runs out on the whole machine, the OOM killer picks its victim among all processes — it may be the database or sshd.