Define size for /dev/shm on container engine

前端 未结 2 883
渐次进展
渐次进展 2020-12-12 21:10

I\'m running Chrome with xvfb on Debian 8. It works until I open a tab and try to load content. The process dies silently...

Fortunately, I have gotten it to run smo

相关标签:
2条回答
  • 2020-12-12 21:18
    docker run --cap-add=SYS_ADMIN --shm-size 2G --name chrome chrome-hd
    

    to run container locally where

    --shm-size 2G
    

    is used to tweak shm available size.

    0 讨论(0)
  • 2020-12-12 21:25

    Mounting an emptyDir to /dev/shm and setting the medium to Memory did the trick!

    spec:
      volumes:
      - name: dshm
        emptyDir:
          medium: Memory
      containers:
      - image: gcr.io/project/image
        volumeMounts:
          - mountPath: /dev/shm
            name: dshm
    
    0 讨论(0)
提交回复
热议问题