Increase Podman memory limit

Viewed 3240

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?

2 Answers

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
Related