You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ok to answer my own question, this can be done with the low level API. Looking at the docker REST API for the ServiceCreate command, the json payload includes a TaskTemplate, that includes a ContainerSpec that includes a Ulimits value. However looking at the corresponding code for ContainerSpec in dockerpy there is no capablity to include ulimits. However, as ContainerSpec is just a DictType, the following works
Activity
[-]Question: Ulimit with service.create ?[/-][+]Question: Ulimit with services.create ?[/+]adb014 commentedon Jun 25, 2025
Ok to answer my own question, this can be done with the low level API. Looking at the docker REST API for the ServiceCreate command, the json payload includes a TaskTemplate, that includes a ContainerSpec that includes a Ulimits value. However looking at the corresponding code for ContainerSpec in dockerpy there is no capablity to include ulimits. However, as ContainerSpec is just a DictType, the following works
though its a little ugly. It would be nice to patch the dockerpy ContainerSpec with