+
Skip to content

[Traefik] Rootless Docker with slirp4netns doesn't show user IP #45337

Discussion options

You must be logged in to vote

Hello there !
The solution I found to this issue is to set traefik ports mode to "host" in my docker compose:

  traefik:
    image: traefik:latest
    container_name: traefik
    restart: always
    ports:
      - target: 80
        published: 80
        mode: host
      - target: 443
        published: 443
        mode: host
      - target: 8448
        published: 8448
        mode: host
    volumes:
      - "/data/cloud/traefik/:/etc/traefik/"
      - "/run/user/1001/docker.sock:/var/run/docker.sock:ro"
    labels:
      - "traefik.http.routers.traefik.rule=Host(`traefik.DOMAIN_NAME`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
      - "traefik.http.routers.traefik.service=api@…

Replies: 9 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@aureliensoria
Comment options

Answer selected by aureliensoria
@adoyle-h
Comment options

@aureliensoria
Comment options

@adoyle-h
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
status/0-triage status/more-info-needed kind/bug Bugs are bugs. The cause may or may not be known at triage time so debugging may be needed. area/networking area/rootless Rootless mode version/23.0
8 participants
Converted from issue

This discussion was converted from issue #45096 on April 14, 2023 09:59.

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载