In addition to the [global-configuration], this goal supports the following global configuration options.
Element | Description | Property |
---|---|---|
Default pattern for naming all containers when they are created. See Container Names for details. |
|
|
showLogs |
In order to switch on globally the logs showLogs can be used as global configuration (i.e. outside of |
|
startParallel |
Starts docker images in parallel while dependencies expressed as Link or dependsOn are respected. This option can significantly reduce the startup time because independent containers do not need to wait for each other. |
|
The <run>
configuration element knows the following sub elements:
Element | Description |
---|---|
capAdd |
List of |
capDrop |
List of |
Command which should be executed at the end of the container’s startup. If not given, the image’s default command is used. See Startup Arguments for details. |
|
Pattern for naming the container when it is created. See Container Naming Strategy for details. |
|
domainname |
Domain name for the container |
dns |
List of |
dnsSearch |
List of |
entrypoint |
Entry point for the container. See <<misc-startup, Startup Arguments] for details. |
Environment variables as subelements which are set during startup of the container. They are specified in the typical maven property format as described Environment and Labels. |
|
envPropertyFile |
Path to a property file holding environment variables. If given, the variables specified in this property file overrides the environment variables specified in the configuration. |
extraHosts |
List of |
exposedPropertyKey |
Set the property part for the exposed container properties as described above. This will take precedence of the image’s |
hostname |
Hostname of the container |
imagePullPolicy |
Specific pull policy for downloading the image. This overwrites any global pull policy. See the global imagePullPolicy configuration option for the possible values and the default. |
Labels which should be attached to the container. They are specified in the typical maven property format as described in Environment and Labels. |
|
Network links for connecting containers together as described in Network Links. |
|
Log configuration for whether and how log messages from the running containers should be printed. This also can configure the log driver to use. See Logging for a detailed description. |
|
memory |
Memory limit in bytes |
memorySwap |
Total memory usage (memory + swap); use -1 to disable swap. |
namingStrategy |
This option is deprecated, please use a
|
Network configuration for your container. |
|
File path into which the mapped port properties are written. The format of this file and its purpose are also described in Port mapping |
|
Port mappings for exposing container ports to host ports. |
|
privileged |
If |
readOnly |
If |
autoRemove |
If |
Restart Policy |
|
securityOpts |
List of |
shmSize |
Size of |
skip |
If |
tmpfs |
List countaintin |
ulimits |
ulimits for the container. This list contains
See below for an example. |
user |
User used inside the container |
Volume configuration for binding to host directories and from other containers. See Volumes for details. |
|
Condition which must be fulfilled for the startup to complete. See Wait for all possible ways to wait for a startup condition. |
|
workingDir |
Working directory for commands to run in |
<run>
<env>
<CATALINA_OPTS>-Xmx32m</CATALINA_OPTS>
<JOLOKIA_OFF/>
</env>
<labels>
<environment>development</environment>
<version>${project.version}</version>
</labels>
<ports>
<port>jolokia.port:8080</port>
</ports>
<ulimits>
<ulimit>
<name>memlock</name>
<hard>-1</hard>
<soft>-1</soft>
</ulimit>
<ulimits>
<tmpfs>
<mount>/var/lib/mysql:size=10m</mount>
<mount>/opt/mydata</mount>
</tmpfs>
<securityOpts>
<opt>seccomp=unconfined</opt>
</securityOpts>
<links>
<link>db</db>
</links>
<wait>
<http>
<url>http://localhost:${jolokia.port}/jolokia</url>
</http>
<time>10000</time>
</wait>
<log>
<prefix>DEMO</prefix>
<date>ISO8601</date>
<color>blue</color>
</log>
<cmd>java -jar /maven/docker-demo.jar</cmd>
</run>