GabrieleMartini
GabrieleMartini

Reputation: 1721

Redis on Ubuntu docker: sysctl: setting key "vm.overcommit_memory": Read-only file system

Using a container docker based on Ubuntu 14.04 image.

Downloaded Redis from official repository

wget http://download.redis.io/redis-stable.tar.gz

and installed.

Trying to set

sudo sysctl vm.overcommit_memory=1

return

sysctl: setting key "vm.overcommit_memory": Read-only file system

How to solve?

Thank you

Upvotes: 4

Views: 5646

Answers (1)

larsks
larsks

Reputation: 312370

Only a limited number of sysctl values support namespacing -- that is, can be set in a container without also modifying the host.

All other values will be read-only inside your containers in order to prevent containers from modifying the host configuration. You'll need to set them on the host -- where they will affect the host and all containers.

Upvotes: 6

Related Questions