Docker Community Forums

Share and learn in the Docker community.

Docker rootless cannot open privileged ports

docker rootless
docker compose
Ubuntu 20.04 LTS

I used this setting in docker-compose:

    cap_add:
      - NET_BIND_SERVICE 

Or typed this in terminal

sudo setcap cap_net_bind_service=ep $HOME/bin/rootlesskit

the domain DNS records A point to server
Iptables allow 80 and 443 ports

My caddy proxy server cannot open 80 or 443 ports.

I don’t thinks thats possible. Ports below 1000 required root privileges to open and since the docker daemon isn’t running as root it can’t use those ports.

Due to Docker documentation it is possible, but it doesn’t work.

How to deploy rootless docker on Ubunto 20.04 LTS server? settings above not working.