anchor.diff:  CMD ["/tomcat/bin/catalina.sh","run"]
   ----
   <1> +tomcat-users.xml+ file is located at same directory as +Dockerfile+.
  +
  +[[docker-compose-format]]
  +== Docker-Compose Format
  +
  +Instead of using Arquillian Cube format, you can use Docker Compose format to define containers layout. This means that you can use the same Docker Compose file for running your tests with Arquillian Cube and without any change run `docker-compose up` command from terminal and get the same result.
  +
  +It is important to note that this is not a docker-compose implementation but only the docker-compose format. This means that for example you cannot execute some CLI commands of _docker-compose_ like start several instances of same service.
  +
  +In case of some specific Arquillian Cube attributes like await strategy cannot be configured and the default values are going to be used.
  +
  +Moreover there are some docker-compose commands that are not implemented yet due to restrictions on docker-java library. These commands are _label_, _pid_, _domainname_, _log_driver_, _security_opt_ and _read_only_. But they will be implemented as soon as docker-java library adds their support.
  +
  +Last thing, in case you define a command that is not implemented in Arquillian Cube, this command will be ignored (no exception will be thrown), but a log line will be printed notifying this situation. Please it is really important that if this happens you open a bug so we can add support for them. Althought this warning we will try to maintain aligned with the latest docker-compose format.
  +
  +Let's see how you can rewrite previous HelloWorld example with Tomcat to be used using docker-compose format.
  +
  +First let's create a file called `envs` on root of the project which configures environment variables:
  +
  +[source]
  +.envs
  +----
  +TOMCAT_PASS=mypass
  +JAVA_OPTS=-Djava.rmi.server.hostname=localhost -Dcom.sun.management.jmxremote.rmi.port=8088 -Dcom.sun.management.jmxremote.port=8089 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
  +----
  +
  +Then you can create a file called `docker-compose.yml` following docker-compose commands on root of the project:
  +
  +[source, yml]
  +.docker-compose.yml
  +----
  +tomcat:
  +  env_file: envs
  +  image: tutum/tomcat:7.0
  +  ports:
  +      - "8089:8089"
  +      - "8088:8088"
  +      - "8081:8080"
  +----
  +
  +and finally you can configure in `arquillian.xml` file that you want to use docker-compose format.
  +
  +[source, xml]
  +.src/test/resources/arquillian.xml
  +----
  +<extension qualifier="docker">
  +  <property name="serverVersion">1.13</property>
  +  <property name="serverUri">localhost</property>
  +  <property name="definitionFormat">COMPOSE</property>
  +  <property name="dockerContainersFile">docker-compose.yml</property>
  +</extension>
  +
  +<container qualifier="tomcat">
  +  <configuration>
  +    <property name="host">${docker.tomcat.host}</property>
  +    <property name="httpPort">8081</property>
  +    <property name="user">admin</property>
  +    <property name="pass">mypass</property>
  +  </configuration>
  +</container>
  +----
  +
  +And that's all, you can now reuse your existing docker-compose files in Arquillian Cube too. 
  +You can see the full example at: https://github.com/arquillian/arquillian-cube/tree/master/docker/ftest-docker-compose
   
   == Enrichers
   
  
positive.code: <1> The name that are going to be assign to running container. It is *mandatory*.
  <2> The name of the image to be used. It is *mandatory*. If the image has not already been pulled by the _Docker_ server, *Arquillian Cube* will pull it for you. If you want to always pull latest image before container is created, you can configure *alwaysPull: true*.
  <3> Sets exposed ports of the running container. It should follow the format _port number_ slash(/) and _protocol (udp or tcp). Note that it is a list and it is not mandatory.
  <4> After a container is started, it starts booting up the defined services/commands. Depending on the nature of service, the lifecycle of these services are linked to start up or not. For example Tomcat, Wildlfy, TomEE and in general all Java servers must be started in foreground and this means that from the point of view of the client, the container never finishes to start. But on the other side other services like Redis are started in background and when the container is started you can be sure that Redis server is there. To avoid executing tests before the services are ready, you can set which await strategy should be used from *Arquillian Cube* side to accept that _Docker_ container and all its defined services are up and ready. It is not mandatory and by default native strategy is used.
  <5> In +strategy+ you set which strategy you want to follow. Currently three strategies are supported. _static_, _native_ and _polling_.
  <6> You can pass environment variables by using `env`. In this section you can set special `dockerServerIp` string which at runtime will be replaced by _Cube_ to current docker server ip.
  <7> After the container is up, a list of commands can be executed within it.
  
negative.code: |dockerContainersFile
  |Instead of embedding YAML string, you can set YAML file location in this attribute. This location can be a relative location from root of the project or also a URI that is converted to URL so you can effectively have docker definitions on remote sites. 
  
  |definitionFormat
  |Sets the format of content expressed in `dockerContainers` attribute or in file set in `dockerContainersFile`. It can contain two possible values _CUBE_ (default one in case of not set) to indicate that content is written following <<cube-format, Arquillian Cube>> format or _COMPOSE_ to indicate that content is written following <<docker-compose-format, Docker Compose>> format.
  
  |autoStartContainers
  |Cube will normally only start a _Docker_ container when it has the same name as an active _Arquillian_ container. That works for things that are _DeployableContainer_'s. For any other service, e.g. a database, you can use the _autoStartContainers_ option to define which _Docker_ containers to automatically start up. The option takes a comma separated list of _Docker_ container ids. e.g. _tomcat7, mysql_. *Arquillian Cube* will attempt to start the containers in parallel if possible as well as start any linked containers.
  
  