-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- update dynamic ports in the run service - cleaned up compiler warnings - allow 'HostIp' to be bound as maven property and exported - introduced 'PortMapping.Writer' to handle property file writing Signed-off-by: Jae Gangemi <jgangemi@gmail.com>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -136,6 +136,10 @@ parentheses. | |
container logs. This configuration can be overwritten by individual | ||
run configurations and described below. The format is described in | ||
the [section](#log-configuration) below. | ||
* **portPropertyFile** if given, specifies a global file into which the | ||
mapped properties should be written to. The format of this file and | ||
its purpose are also described [below](#port-mapping). Please note, this field takes precidence | ||
over any `portPropertyFile` value specified in an `image` configuration. | ||
* **sourceDirectory** (`docker.source.dir`) specifies the default directory that contains | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jgangemi
Author
Owner
|
||
the assembly descriptor(s) used by the plugin. The default value is `src/main/docker`. This | ||
option is only relevant for the `docker:build` goal. | ||
|
@@ -622,17 +626,17 @@ equivalent to the port mapping when using the Docker CLI with option | |
<ports> | ||
<port>18080:8080</port> | ||
<port>host.port:80</port> | ||
<port>host.ip@host.port:80</port> | ||
<ports> | ||
``` | ||
|
||
A `port` stanza may take one of two forms: | ||
A `port` stanza may take one of four forms: | ||
|
||
* A tuple consisting of two numeric values separated by a `:`. This | ||
form will result in an explicit mapping between the docker host and | ||
the corresponding port inside the container. In the above example, | ||
port 18080 would be exposed on the docker host and mapped to port | ||
8080 in the running container. | ||
* A tuple consisting of a string and a numeric value separated by a | ||
* **18080:8080** : A tuple consisting of two numeric values separated by a `:`. This | ||
form will result in an explicit mapping between the docker host and the corresponding | ||
port inside the container. In the above example, port 18080 would be exposed on the | ||
docker host and mapped to port 8080 in the running container. | ||
* **host.port:80** A tuple consisting of a string and a numeric value separated by a | ||
`:`. In this form, the string portion of the tuple will correspond | ||
to a Maven property. If the property is undefined when the `start` | ||
task executes, a port will be dynamically selected by Docker in the | ||
|
@@ -647,6 +651,9 @@ A `port` stanza may take one of two forms: | |
expression similar to `<value>${host.port}</value>`. This can be | ||
used to pin a port from the outside when doing some initial testing | ||
similar to `mvn -Dhost.port=10080 docker:start` | ||
* **host.ip+18080:80** Similar to above except the `host.ip` is mapped and it cannot be set | ||
using a system property. | ||
* **host.ip+host.port:80** Bind `host.ip` and `host.port` to maven properties. | ||
|
||
Both forms of the `port` stanza also support binding to a specific ip | ||
address on the docker host. | ||
|
@@ -655,6 +662,7 @@ address on the docker host. | |
<ports> | ||
<port>1.2.3.4:80:80</port> | ||
<port>1.2.3.4:host.port:80</port> | ||
<port>1.2.3.4:host.ip+host.port:80</port> | ||
</ports> | ||
This comment has been minimized.
Sorry, something went wrong.
rhuss
|
||
``` | ||
|
||
|
I don't think that this restriction is necessary. One could also write out the the
portPropertyFile
specified in the image configuration (so that two files are written). Only in the case when there is a name conflict, the 'global' one wins (since it then also contains the image specific properties).