Skip to content

Support no-new-privileges in docker stack deploy #7573

Backlog

Description

@lmachineone

Description

Support the Compose service option security_opt: [no-new-privileges:true] in docker stack deploy. Swarm has a native NoNewPrivileges field in Engine 25.0 (API 1.44), so the CLI can carry this setting into the service spec on creation and update.

The CLI should report a clear error when the negotiated API cannot support an enabled setting. Other unsupported security_opt entries should continue to produce a warning.

Related engine support: moby/moby#46386.

Test environment

The development client built from patched Docker CLI commit dd4182277882d7c2675fbccd4d4266382a59207a (PR #7574) reported Docker version 29.11.0-dev, build dd4182277.

Server version and docker info are unavailable because the Compose and Stack command fixtures use an in-memory Engine HTTP transport.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions