Skip to content

Deploy script adds disallowed property name to network in docker-stack.yml #336

Open
@andretheronsa

Description

@andretheronsa

When running the deploy.sh script docker stack deploy -c ... fails with:

networks.traefik-public Additional property name is not allowed

The following gets added to the docker-stack.yml by docker-compose -f docker-compose.yml config > docker-stack.yml

networks: traefik-public: external: true name: traefik-public

This goes for docker-compose file version 3.3 and 3.6.

If I remove the name: traefik-public line everything works fine. I am not that experienced with docker networks but why is config adding a property that docker stack deploy does not allow?


Ubuntu 20.04
Docker version 20.10.2, build 2291f61
docker-compose version 1.27.4, build 40524192
docker-py version: 4.3.1
CPython version: 3.7.7
OpenSSL version: OpenSSL 1.1.0l 10 Sep 2019

Activity

changed the title [-]Deploy script adds disallowed name property to network[/-] [+]Deploy script adds disallowed property name to network in docker-stack.ym[/+] on Jan 10, 2021
changed the title [-]Deploy script adds disallowed property name to network in docker-stack.ym[/-] [+]Deploy script adds disallowed property name to network in docker-stack.yml[/+] on Jan 10, 2021
ttamg

ttamg commented on Jan 29, 2021

@ttamg

I also have the same issue.

Using:

  • Ubuntu 20.04
  • Docker 19.03.13
  • docker-compose 1.27.4

Simple fix was to move the version up to 3.6 in the docker-compose.yml and that then enabled it to spin up the stack.

added a commit that references this issue on Mar 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @tiangolo@ttamg@andretheronsa

        Issue actions

          Deploy script adds disallowed property name to network in docker-stack.yml · Issue #336 · fastapi/full-stack-fastapi-template