Skip to content

Docker 4.15.0 does not prompt for root when using privileged ports in docker-compose #6610

@mscrivo

Description

@mscrivo
  • I have tried with the latest version of Docker Desktop
  • I have tried disabling enabled experimental features
  • I have uploaded Diagnostics
  • Diagnostics ID:

Expected behavior

After upgrading to 4.15.0, I noticed that my traefik container which we use for development to handle traffic for local developer domains on port 443 stopped working. Upon inspecting the docker containers, port mappings, logs, everything looked fine. But checking open ports on the system showed that 443 was not in the list. Docker 4.15 does not let you know that root is required for the daemon when using privileged ports, it just happily starts without opening the port. I expect it to at least prompt to user that they are doing something that requires root. For example, if I run: docker run -p 127.0.0.1:443:443 -it --rm hello-world it does prompt me for root, but docker-compose does not.

Actual behavior

Information

  • macOS Version: 13.0
  • Intel chip or Apple chip: Apple M1
  • Docker Desktop Version: 4.15.0

Steps to reproduce the behavior

sample docker-compose.yml that has the issue

---
version: "3.8"
services:
  traefik:
    container_name: traefik
    build:
      context: ./dev_config
      dockerfile: traefik/Dockerfile
    restart: always
    ports:
      - "80:80"
      - "443:443"
    extra_hosts:
      - host.docker.internal:host-gateway

The custom dockerfile is just to mount the appropriate certs, otherwise it's a standard traefik image.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions