How to remount the proc filesystem in a docker as a r/w system?

I have installed docker 0.11.1 over Ubuntu 12.04.
I am trying to change the shmmax from its fixed value (32 M) to something bigger (1G)
from within the docker when I run the command

sysctl -w kernel.shmmax=1073741824
error: "Read-only file system" setting key "kernel.shmmax"

That is because /proc is mounted ro in the container.

  • Docker Notary no trust data available
  • Django : Getting error while removing django.contrib.sites from INSTALLED_APPS
  • Docker. Spring application. set & get environment variable
  • How to use GC in Docker Registry without accessing container
  • Docker: data volume container is not instantiated with `docker create` command
  • How to create docker machine with specific version?
  • Can someone tell me how to mount the proc as r/w in my container to change it?

  • Unable to modify file as part of entry point command
  • Connect to Dockerized IIS remotely
  • Setting the Docker's container environnement (Env) via the docker remote api
  • Docker on Raspberry Pi 2: Could not reach any registry endpoint
  • Run Teampass in docker with a running nginx proxy
  • How do I use the git commit id as a docker image tag in maven?
  • 2 Solutions collect form web for “How to remount the proc filesystem in a docker as a r/w system?”

    I have had some luck like so:

    mount -o remount rw /proc/sys
    sysctl -w [your settings here]
    

    You don’t. sysctl values are not confined to the container — they affect the whole system, so it’s not appropriate for a container to be able to change them.

    If you want to set a higher value for this variable, do that from the host system.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.