Skip to content
Reject unlabeled requests

Reject unlabeled requests

Only serve requests for containers that carry the sablier.enable=true label, and reject requests targeting anything else.

# compose.yml
services:
  sablier:
    image: sablierapp/sablier:next
    command:
      - start
      - --provider.name=docker
      - --provider.reject-unlabeled-requests=true
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock

  unmanaged:
    image: acouvreur/whoami:v1.10.2

A direct request for the unlabeled unmanaged container is rejected because it is not labelled as Sablier-managed.

By default Sablier will act on any instance name it receives. With --provider.reject-unlabeled-requests=true, Sablier only serves requests for containers that carry the sablier.enable=true label and rejects requests targeting anything else.

When to use it

Use this to make sure only explicitly opted-in containers can be managed through Sablier, so a request for an unlabeled container is refused instead of acted upon.

Flags

See the runnable example.