@Target(value=TYPE) @Retention(value=RUNTIME) @Indexed @Inherited public @interface DockerFixture
DockerContainer subtype that exposes fixture-specific methods.
The fixture should be accompanied by a Dockerfile resource in a predictable spot (see dockerfileFolder()).
A fixture class may extend another fixture class.
In this case the FROM directive should specify an image whose name is jenkins/
followed by the id() of the parent fixture; the tag is the first 12 characters of the sha1sum
of the parent fixture’s Dockerfile. You will be able to see the tagged parent image names in your log.
| Modifier and Type | Fields and Description |
|---|---|
static String |
DEFAULT_DOCKER_IP |
| Modifier and Type | Required Element and Description |
|---|---|
String |
id
Unique ID of this fixture.
|
| Modifier and Type | Optional Element and Description |
|---|---|
String |
bindIp
Deprecated.
this assumes you have network knowledge of the running ATH environment which you can not possibly have.
Docker may be running on a remote machine and as such any address (e.g.
127.0.0.5)
you specify may not be reachable. |
String |
dockerfileFolder
Path of Dockerfile file.
|
boolean |
matchHostPorts
Map container ports to host ports exactly.
|
int[] |
ports
TCP ports that are exposed from this fixture.
|
int[] |
udpPorts
UDP ports that are exposed from this fixture.
|
public static final String DEFAULT_DOCKER_IP
public abstract String id
public abstract int[] ports
When a container is started, these ports from the container are mapped to
random ephemeral ports on the host. The actual ephemeral port number can
be retried at runtime via DockerContainer.port(int).
public abstract int[] udpPorts
When a container is started, these ports from the container are mapped to
random ephemeral ports on the host. The actual ephemeral port number can
be retried at runtime via DockerContainer.udpPort(int).
public abstract boolean matchHostPorts
If true, no random ephemeral ports will be used, but an exact matching of container and host ports.
@Deprecated public abstract String bindIp
127.0.0.5)
you specify may not be reachable.public abstract String dockerfileFolder
By default Dockerfile fixture should be placed in the resource directory and at the same package as DockerContainer subtype.
If this attribute is present, Dockerfile folder specified in the attribute is used as Dockerfile fixture place.
Copyright © 2004–2018. All rights reserved.