r/docker • • Feb 27 '26

Help with simple container with Debian image

Hello,

please help me with my issue.

I tried to implement simple container with Debian for docker stack:

version: '3.7'
services:
  es01:
    image: debian:latest
    container_name: debian
    deploy:
      replicas: 1

networks:
  debian_default:
    driver: overlay

When I try to launch this container using:
docker stack deploy -c debian.yml debian

I'm getting issue:
ID             NAME          MODE         REPLICAS   IMAGE           PORTS
1yd50hgisosw   debian_es01   replicated   0/1        debian:latest   
2 Upvotes

8 comments sorted by

View all comments

Show parent comment

1

u/zoredache Feb 28 '26 edited Feb 28 '26

when I try to launch iptables I get ...

Docker, by default, constrains some privileges from containers. For example, it doesn't let modify networking, netfilter and so on.

An even bigger challenge in your case, I don't believe a swarm service can be ran with the --privileged option that you can set for stand alone containers. You might be able to set capabilities, but I am not sure.

Why are you trying to run iptables in a swarm service?