Determine size for / dev / shm on container

I run Chrome from xvfb on Debian 8. It works until I open a tab and try to load the content. The process dies silently ...

Fortunately, I got it to work smoothly on my local docker using docker run --shm-size=1G.

There is a known bug in Chrome that causes it to crash when / dev / shm is too small.

I am deploying the Container engine and checking the OS specifications. The host OS has a solid 7G installed in / dev / shm, but the actual container is allocated only 64M. Chromatic failures.

How to set the size / dev / shm when using kubectl to deploy in a container?

+6
source share
2 answers

Installing emptyDirin / dev / shm and setting up the environment on Memorydid the trick!

spec:
  volumes:
  - name: dshm
    emptyDir:
      medium: Memory
  containers:
  - image: gcr.io/project/image
    volumeMounts:
      - mountPath: /dev/shm
        name: dshm
+10
source
docker run --cap-add=SYS_ADMIN --shm-size 2G --name chrome chrome-hd

to run the container locally where

--shm-size 2G

used to adjust the size of the available shm.

-one
source

Source: https://habr.com/ru/post/1016499/


All Articles