Using Docker Secrets with Docker-Rootless & Docker Compose

External secrets will not work with docker-compose deployments, You will need to declare and use them them inside the compose file,

I always felt that it’s rather an issue and not a feature that schema version "3.x"allows docker-compose to use secrets outside a swarm.

Generaly all compose file configuration options can be translated into valid docker command arugments and vice versa. The only exception I am aware of are secrets used with docker-compose, as the docker command is not valid outside the swarm mode.

Imho using secrets in a compose file is the only reason to use a version "3.x" schema version with docker-compose. Then again having to declare the secret in the compose file doesn’t make it any better than binding a file in read-only mode into the container.

N.B.: Secrets in swarm are distributed encrypted amongst all nodes and stored in the cluster’s raft logs.