Docker Community Forums

Share and learn in the Docker community.

Limit access to containers

My App is composed of three containers:

  • Frontend
  • Backend
  • Worker

I need the Backend to be able to run commands in the worker using the Docker API. It is well explained here (The socket solution part).

But there is a security issue, as the Backend container would also have access to make actions on the Frontend and Backend containers.

So here is my question, is-it possible to limit access to only one container ?

If not, do you have any suggestion ?

Many thanks for your help :slight_smile:

You can either take a look at or switch to Kubernetes and make use of a service account and RBAC to restrict what it’s allowed to do.

1 Like

Thank you meyay, I have explored a bit these two possibilties. After some reflexion, I think the best approach is to use an SSH connection between my backend container an my worker container.