Class Docker.Port

java.lang.Object
org.openrewrite.docker.tree.Docker.Port
All Implemented Interfaces:
Docker, org.openrewrite.Tree
Enclosing interface:
Docker

public static class Docker.Port extends Object implements Docker
A port specification in an EXPOSE instruction. Supports formats: 80, 80/tcp, 80/udp, 8000-9000, 8000-9000/tcp, ${PORT}
  • Constructor Details

    • Port

      public Port()
  • Method Details

    • acceptDocker

      public <P> Docker acceptDocker(DockerVisitor<P> v, P p)
      Specified by:
      acceptDocker in interface Docker
    • isVariable

      public boolean isVariable()
      Returns true if this port specification contains environment variables and the actual port number is not known at parse time.
    • isRange

      public boolean isRange()
      Returns true if this is a port range (e.g., 8000-9000)