1. Layerfile Reference
  2. MEMORY

MEMORY [number](K|M|G)

The MEMORY instruction allows you to specify how much memory your environment uses.

This directive must always go at the top of a Layerfile.

If used in conjunction with FROM /base-image, the parent Layerfile must be the one which specifies MEMORY, otherwise children might have to re-run steps from the parent Layerfile.

‚Äč
Examples

  • Use MEMORY 2G to ensure at least 2 gigabytes of memory are available.