Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow build ulimit to be defined in the compose file #11167

Closed
guilhermenovais opened this issue Nov 7, 2023 · 4 comments
Closed

Allow build ulimit to be defined in the compose file #11167

guilhermenovais opened this issue Nov 7, 2023 · 4 comments
Assignees

Comments

@guilhermenovais
Copy link

Description

Currently, it is only possible to set ulimits for the container execution, but I also need to set it for the build, so I need to manually build the image using docker build -t _example_ --ulimit nofile=65536:65536 . and then run docker compose up, instead of just running docker compose up --build.

It would be nice if there was an element inside the build element that allowed ulimits to be defined.
This is what I have in mind:

version: '3'
services:
  example:
    image: _exemple_
    build:
      context: .
      ulimits:
        nofile:
          soft: 65536
          hard: 65536
@Torxed
Copy link

Torxed commented Nov 13, 2023

Can confirm, this is a pain in the build process when fakeroot iterates over all file descriptors for potential childs, as it can take forever.

Having a way to manipulate nofile parameters during build, but not execution would help speed up builds from 168.7s -> 0.7s.

@ndeloof ndeloof closed this as completed Nov 13, 2023
@ViliusS
Copy link

ViliusS commented Nov 14, 2023

@ndeloof just for the record, which version will have this?

@ndeloof
Copy link
Contributor

ndeloof commented Nov 14, 2023

v2.23.1 to be release later this week will have the fix

@Torxed
Copy link

Torxed commented Nov 14, 2023

Thank you for the quick and awesome work, looking forward to this one :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants