Giter Site home page Giter Site logo

Comments (7)

ndeloof avatar ndeloof commented on July 20, 2024

I prefer we fix the spec to match docker run -p ... behavior so Docker Compose user don't get into weird issues with compose to configure ports in some unexpected way due to non-consistent defaults

from compose-go.

lionello avatar lionello commented on July 20, 2024

@ndeloof Docker doesn't have ingress, so that would imply host mode as well.

from compose-go.

ndeloof avatar ndeloof commented on July 20, 2024

non-swarm docker engine is single node and then those are just the same

from compose-go.

lionello avatar lionello commented on July 20, 2024

@ndeloof the problem is that most ingress controllers won't let you map any host port to any ingress port, so it often doesn't make sense to consider - "1234:1234" to mean "ingress on 1234 mapped to host port 1234".

Generally, I find it surprising that - 1234 behaves differently from - target: 1234, and - "1234:1234" differently from

- target: 1234
  published: 1234

The long syntax leaves mode undefined, does not assume "ingress". (In fact, they also leave protocol undefined, too, whereas the short syntax results in protocol: tcp)

from compose-go.

ndeloof avatar ndeloof commented on July 20, 2024

it often doesn't make sense to consider - "1234:1234" to mean "ingress on 1234 mapped to host port 1234".

it doesn't, it just means "ingress on 1234 mapped to container port 1234"

from compose-go.

ndeloof avatar ndeloof commented on July 20, 2024

I find it surprising that ...

sure, this is docker run legacy

from compose-go.

lionello avatar lionello commented on July 20, 2024

it often doesn't make sense to consider - "1234:1234" to mean "ingress on 1234 mapped to host port 1234".

it doesn't, it just means "ingress on 1234 mapped to container port 1234"

You’re right, that’s what I meant.

What to do when a host IP is mentioned in the short syntax? Surely that means host mode.

from compose-go.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.