Sets per-container ulimits for file handles and similar resources.

Section: Resource and Runtime Controls

Raise ulimits

yaml
yaml
services:
  app:
    image: myapp:latest
    ulimits:
      nofile:
        soft: 65535
        hard: 65535
Explanation

Useful for proxies, databases, and event-driven services.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Resource and Runtime Controls
Restart policy
Restarts the service unless it is explicitly stopped.
OpenIn sheetyamlsame section
Inject extra hosts
Adds static host entries inside the container.
OpenIn sheetyamlsame section
Publish container port
Maps host port 8080 to container port 80.
OpenIn sheetyaml2 tag match
Named volume for persistent data
Stores database data in a managed named volume.
OpenIn sheetyaml2 tag match
Mount a secret file
Mounts a file-backed secret into the container.
OpenIn sheetyaml2 tag match
Bind only on localhost
Publishes the service only to the local machine.
OpenIn sheetyaml2 tag match