Rancher-compose ulimit setting

I have a container configured with rancher-compose that I need to modify the ulimit for. According to the docker-compose documentation [1], this should be possible with the following:

    soft: 20000
    hard: 40000

Is this supported in Rancher? I added it to my docker-compose.yml file and used the CLI to create the stack but it had no effect. When I check the stack config from the UI, the ulimit part is missing. The same also happens if I paste my docker-compose file into the new stack UI.

[1] https://docs.docker.com/compose/compose-file/#ulimits

Currently, this is not supported in Rancher today. There are a lot of settings that were introduced into docker-compose.yml that need support in docker/libcompose, which is what rancher-compose is based on. I’ve started an issue to track them down.

Thanks for getting back to me, it sounds like this will eventually be supported which is great.

In the meantime, and for anyone else coming across this, I’ve worked around it by setting the --default-ulimit option on the Docker daemon. I have a provisioning script for my Rancher hosts so it was pretty straightforward but I believe it’s also possible in the UI under Advanced Options -> Engine Options when adding a host?

Can you provide more information on how you did to set the ulimit? I tried to access the host machine (Ubuntu 16) but I can’t figure out how to change the Docker Daemon to set the ulimit