Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version 1.10.0 error on gateway spec #4366

Closed
jhmnieuwenhuis opened this issue Jan 20, 2017 · 7 comments
Closed

version 1.10.0 error on gateway spec #4366

jhmnieuwenhuis opened this issue Jan 20, 2017 · 7 comments

Comments

@jhmnieuwenhuis
Copy link

jhmnieuwenhuis commented Jan 20, 2017

version: "3"

services:

  nexus:
    build: ../docker4man-nexus-2.0/.
    container_name: d4m-nexus
    image: d4m-nexus
    env_file: env-docker4man-nexus.txt
    restart: "no"
    ports:
      - "8081:8081"
      - "8443:8443"
      - "18443:18443"
      - "18444:18444"
    volumes:
      - "d4m-nexus-volume:/nexus-data"
    networks:
      - backend

volumes :
  d4m-nexus-volume:
    external: true
  nexus_30-volume:
    external: true

networks:
  backend:
    driver: bridge
    ipam:
      config:
        - subnet: 172.20.1.0/24
          gateway: 172.20.1.1

docker-compose up gives error :

ERROR: The Compose file './yaml-docker4man-nexus-2.0/docker4man-nexus.yml' is invalid because:
networks.backend.ipam.config value Additional properties are not allowed ('gateway' was unexpected)

Is this a bug ?

If I change version from 3 to 2, there is no error.

@shin-
Copy link

shin- commented Jan 20, 2017

cc @dnephin

Looks like an incomplete definition of the IPAMPool type here, not sure whether that's intentional or not.

@dnephin
Copy link

dnephin commented Jan 23, 2017

It is intentional. Swarm mode doesn't support setting the rest of these fields (as of docker 1.12), so they are excluded from the V3 format.

If/when that changes we can add them to 3.1

@jhmnieuwenhuis
Copy link
Author

Ok Thanks for the answers.
Does this mean that I have to stick to version 2.
Or is it no longer necessary to define the gateway when not in swarm mode in version 3 ?
How does it define the gateway then...

Regards

@dnephin
Copy link

dnephin commented Jan 23, 2017

It was never necessary to define a gateway for most use cases. You only need it if you want to customise the network. In swarm mode the network is more tightly managed by swarmkit, so it isn't possible to control the gateway (yet at least).

@jhmnieuwenhuis
Copy link
Author

jhmnieuwenhuis commented Jan 23, 2017 via email

@guhcampos
Copy link

It was never necessary to define a gateway for most use cases. You only need it if you want to customise the network. In swarm mode the network is more tightly managed by swarmkit, so it isn't possible to control the gateway (yet at least).

Was there any discussion on that? I do need to customize the network, because my company uses the 172.16.0.0/16 address range at some segments and Docker will simply clash with that by default, so every single Docker server in the whole company needs a forced network setting.

Now while upgrading my dev environment to Docker 1.13 it took me hours to stumble into this Github issue, because the removal of those options was completely undocumented.

So please, if I am working on a network which requires a custom docker subnet, how am I supposed to use Docker Compose and Docker Swarm?

@shin-
Copy link

shin- commented Feb 21, 2017

@guhcampos Can you create an issue on docker/docker? Like @dnephin said, this is unsupported by Swarm mode, so there's nothing we can do at our level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants