Blueprints

Limit Docker container memory to 500MB for a Python script

Source

yaml
id: limit-memory
namespace: company.team

tasks:
  - id: docker_memory
    type: io.kestra.plugin.scripts.python.Script
    taskRunner:
      type: io.kestra.plugin.scripts.runner.docker.Docker
      memory:
        memory: 500MB
    containerImage: python:3.11-slim
    script: |
      import time
      time.sleep(2)

About this blueprint

Docker Python

The example below will use no more than 500MB of memory for the Docker container.

Script

Docker

More Related Blueprints

New to Kestra?

Use blueprints to kickstart your first workflows.

Get started with Kestra