Resource limitations of container

docker run --cpus="0.1" --memory="1.6g" --memory-swap="1.6g" --storage-opt size=10G your_image

CPU 10% RAM 1.6 Gb (also 10% if you have 16 Gb) Swap 1.6 Gb - swap space to writo on disk when out of memory Hard drive: 10 Gb

Using docker compose:

services:
  app_name:
    image: your_image
    deploy:
      resources:
        limits:
          cpus: '0.1'
          memory: 1.6g
    storage_opt:
      size: 10G