Docker daemon memory leak due to logs from long running process
There is still at least one outstanding issue relating to memory leaks with logs: https://github.com/docker/docker/issues/9139
This may not be what you are looking for, but I usually run a cron job to restart my containers after a certain amount of time everyday. This ensures that the container has enough RAM all the time, and also I generally restrict the maximum ram usage by the container while creating them.
Containers take only few seconds to restart and serve data and if you are not running a High Availability service and can afford a few seconds downtime, consider restarting the container (assuming that you dont have persistent volumes).
However, if you do find a solution to your problem, do let us know.
docker rm $(docker ps -a -q)
docker rmi --force $(docker images -q)
docker system prune --force
Need to be root user.
systemctl stop docker
rm -rf /var/lib/docker/aufs
apt-get autoclean
apt-get autoremove
systemctl start docker