Class PortBindingParser
- java.lang.Object
-
- org.jenkinsci.plugins.dockerbuildstep.util.PortBindingParser
-
public class PortBindingParser extends Object
Parser for port mapping definitions that define how exposed container ports are mapped to host ports of the Docker server.
-
-
Constructor Summary
Constructors Constructor Description PortBindingParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.github.dockerjava.api.model.PortBinding[]
parse(String definition)
Parses a textual port binding definition to an array ofPortBinding
s.
-
-
-
Method Detail
-
parse
public static com.github.dockerjava.api.model.PortBinding[] parse(String definition) throws IllegalArgumentException
Parses a textual port binding definition to an array ofPortBinding
s. Assumes one port binding per line in format- hostPort containerPort
- hostPort containerPort/protocol
- hostIP:hostPort containerPort
- hostIP:hostPort containerPort/protocol
- Throws:
IllegalArgumentException
- if any error occurs during parsing
-
-