Search code examples
containerspodman

Increase Podman memory limit


I am trying to build a large image with Podman. The build fails with

 Reached heap limit Allocation failed

error.

In docker I can avoid this by allocating more memory for docker engine in docker settings.

However, for Podman it doesn't seem to be so easy. I tried to modify ~/.config/containers/podman/machine/qemu/podman-machine-default.json and increase the memory, then run

podman machine stop
podman machine start

with no luck to solve the problem.

Any ideas?


Solution

  • So after playing around I found out that I was doing the right thing, but it is needed to change the memory amount in two places in the mentioned file (I changed only in one):

    1. In the "CmdLine" section after -m flag
    2. the "Memory" section itself