Add info for skipDefaultPorts
@@ -89,7 +89,9 @@ You need to install the Docker runtime (e.g. Docker Desktop) locally to use this
When dev mode runs with container support it still provides the same features. It monitors files for changes and runs tests either automatically or on demand. This mode also allows you to attach a debugger to work on your application. You can review the logs generated by your server in the Liberty directory in your project e.g. target/liberty/wlp/usr/servers/defaultServer/logs.
-This mode publishes the container ports 9080, 9443 and 7777 by default. If your application needs to publish other ports add them to the `dockerRunOpts` option either in the `pom.xml` file or on the `mvn` command line. E.g. `-DdockerRunOpts="-p 9081:9081"`
+By default, this mode publishes the container ports 9080, 9443 and 7777 and maps them to the corresponding local ports of the same value. If your application needs to publish additional ports, add them to the `dockerRunOpts` option either in the `pom.xml` file or on the `mvn` command line. E.g. `-DdockerRunOpts="-p 9081:9081"`. If you need to map the container ports to different local ports, use the `skipDefaultPorts` option and specify the alternative mappings using the `dockerRunOpts` option. E.g. `-DskipDefaultPorts -DdockerRunOpts="-p 8000:9080" -p 8001:9443"`.
+
+The previous example should be used when you want to run multiple instances of dev mode in container mode. You can start the first instance with default settings, but you will need to specify `skipDefaultPorts` and the alternative ports in `dockerRunOpts`, as shown in the previous example, for all following instances. Instead of explicity defining the local ports yourself for each instance of dev mode, you can have Docker map random ephemeral local ports to the exposed container ports (9080, 9443) by adding `-P` to `dockerRunOpts`. E.g. `-DskipDefaultPorts -DdockerRunOpts="-P"`.
##### Console actions
@@ -147,3 +149,4 @@ These parameters are available in addition to the ones in the `dev` section abov
| dockerRunOpts | Specifies options to add to the `docker run` command when using dev mode to launch your server in a container. For example, `-e key=value` is recognized by `docker run` to define an environment variable with the name `key` and value `value`. | No |
| dockerfile | Location of a Dockerfile to be used by dev mode to build the Docker image for the container that will run your Liberty server. The directory containing the Dockerfile will also be the context for the `docker build`. The default value is `Dockerfile`. | No |
| dockerBuildTimeout | Maximum time to wait (in seconds) for the completion of the Docker operation to build the image. The value must be an integer greater than 0. The default value is `60` seconds. | No |
+| skipDefaultPorts | If set to `true`, dev mode will not publish the default Docker port mappings of `9080:9080` and `9443:9443`. Use this option if you would like to specify alternative local ports to map to the exposed container ports using the `dockerRunOpts` option. | No |
