docker stackswarm无法正常工作,但docker-compose正常

问题描述

我的测试服务在docker-compose中工作,但不在swarm中运行:/

version: "3.3"

services:

  traefik:
    image: "traefik:v2.2"
    command:
      #- "--log.level=DEBUG"
      - "--api.insecure=true"
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--entrypoints.web.address=:80"
    ports:
      - "80:80"
      - "8080:8080"
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:ro"

  whoami:
    image: "containous/whoami"
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.whoami.rule=Host(`myurl.com`)"
      - "traefik.http.routers.whoami.entrypoints=web"

有人对我的问题有想法吗? 就像仅在群体模式下存在问题网络,并在docker-compose中进行记录一样。

解决方法

我使用的是archlinux的旧形象,这是一家大型法国三字母网络公司的最新作品。 有了最新的内核,现在一切似乎都很好。