Configure Shared Memory for Docker container

Docker containers by default have a shared memory (/dev/shm) size of 64MB. Some applications such as Chrome requires large amount of memory to display heavy pages.

Example on how to set the SHM size

Docker run

docker run -it --shm-size=256m oracle11g /bin/bash

Docker Compose

version: '3.5'
services:
  your_service:
    build:
      context: .
      shm_size: '2gb' <-- this will set the size when BUILDING
    shm_size: '2gb' <-- when RUNNING