Search code examples
mysqldocker-swarm

Docker swarm service security capabilities


There available some security and resource constraint configuration for docker container applied by running for example docker run -it --cap-add=sys_nice some_image

Is there way to apply constraints for docker swarm service? docker service create --cap-add=sys_nice some_image fails with message: "unknown flag: --cap-add"

EDIT1: I need to resolve issue mentioned here

Thanks!


Solution

  • Support --cap-add in swarm mode was added recently in docker/cli master branch https://github.com/docker/cli/pull/2687. Not sure that the update was added to the stable version.