Create base image with resource restriction

Hello everyone,

I need to create quite a few docker images with similar applications in it and requirements, that all should have the same resource restrictions of CPU and memory usage (like specified via --cpus=“2” --memory=“512m” or something like that).

Is there a way to put these restrictions in a base image for all my actual images to get based on, so I can encapsulate such requirements at one place and do not have to manage them for each actual container individually (since this would make it a hussle once the restrictions requirements gets changed and I need to change them manually for every container etc.)?

Thanks a lot :slight_smile: