Our pipeline consist of dozen steps and one step which builds next.js production docker image requires a lot of memory. So I added size: x2 to options section of bitbucket-pipelines.yml file and set definitions.services.docker.memory to 4096. Everything works but now all my steps are x2, I can't set x1 to other steps when I set x1 pipeline throws an error:
A step does not have the minimum resources needed to run (1024 MB). Services on the current step are consuming 4096 MB
It looks like docker memory limit is set on all steps and I only need it once. How can I give 4096MB to docker service only to one step in pipeline?