GreenCape/phing-tasks

View on GitHub
docs/chapters/docker-list.html

Summary

Maintainability
Test Coverage
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>@CHAPTER@ DockerListTask</title>
        <link rel="stylesheet" type="text/css" href="../css/book.css">
    </head>
    <body>
        <div class="sect1">
            <div class="titlepage">
                <div>
                    <div><h2 class="title" style="clear: both"><a name="DockerListTask"></a>@CHAPTER@ DockerListTask</h2></div>
                </div>
            </div>

            <p>Get a comma separated list of all Docker containers matching the conditions, i.e.,</p>
            <ul>
                <li>name matches the pattern given in <code class="literal">container</code></li>
                <li>state equals the value given in <code class="literal">state</code></li>
            </ul>

            <div class="table">

                <p class="formal-object-title"><span class="label">Table @CHAPTER@.1:&nbsp;</span><span class="title">Attributes</span></p>

                <div class="table-contents">

                    <table summary="Attributes" border="1">
                        <colgroup>
                            <col class="name">
                            <col class="type">
                            <col class="description">
                            <col class="default">
                            <col class="required">
                        </colgroup>
                        <thead>
                            <tr>
                                <th>Name</th>
                                <th>Type</th>
                                <th>Description</th>
                                <th>Default</th>
                                <th>Required</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td><code class="literal">dir</code></td>
                                <td><code class="literal">String</code></td>
                                <td>The directory containing the Docker-Compose configuration file.</td>
                                <td>The current directory</td>
                                <td>No</td>
                            </tr>
                            <tr>
                                <td><code class="literal">returnProperty</code></td>
                                <td><code class="literal">String</code></td>
                                <td>Property name to set return value to.</td>
                                <td>n/a</td>
                                <td>Yes</td>
                            </tr>
                            <tr>
                                <td><code class="literal">override</code></td>
                                <td><code class="literal">Boolean</code></td>
                                <td>Whether to force override of existing value.</td>
                                <td>False</td>
                                <td>No</td>
                            </tr>
                            <tr>
                                <td><code class="literal">container</code></td>
                                <td><code class="literal">String</code></td>
                                <td>A pattern for the container name. Use <code class="literal">?</code> and <code class="literal">*</code> as wildcards.</td>
                                <td>'*'</td>
                                <td>No</td>
                            </tr>
                            <tr>
                                <td><code class="literal">state</code></td>
                                <td><code class="literal">String</code></td>
                                <td>Only containers matching this state value will be included.</td>
                                <td>n/a</td>
                                <td>No</td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
            <br class="table-break">

            <div class="sect2">
                <div class="titlepage">
                    <div>
                        <div><h3 class="title">@CHAPTER@.1 Examples</h3></div>
                    </div>
                </div>

            <pre class="programlisting">&lt;!-- Get a list of all existing containers, regardless of state --&gt;
&lt;docker-list dir="${dirs.docker}" returnProperty="containers"/&gt;

&lt;!-- Get a list of all running containers --&gt;
&lt;docker-list dir="/home/develop" state="up" returnProperty="containers"/&gt;

&lt;!-- Get a list of all running containers having 'sql' in their name --&gt;
&lt;docker-list container="*sql*" state="up" returnProperty="containers"/&gt;
</pre>
            </div>
        </div>
    </body>
</html>