Created: 2024-01-07 | Updated: 2024-09-21

Docker container

New (v0.3.19)

Table of contents

  1. Node Type: docker
  2. Rendering:
  3. Code Snippet:
  4. drawio docker vertex:
  5. Advanced for Geeks:
    1. Style:
    2. Vertex size:
    3. Full XML dump:
    4. drawio file:

Node Type: docker

Rendering:

lambda

Code Snippet:

# given
mcd = MultiCloudDiagrams()

# when
arn = 'arn:aws:ecs:eu-west-1:123456789012:container/cluster/777/123'
metadata = {
    'name': 'my-app',
    'image': '123456789012.dkr.ecr.eu-west-1.amazonaws.com/cluster/myapp:v2-22-00',
    'imageDigest': 'sha256:5562sfsf60a6d1aaed5c2bb227d3d4ec14c755bdb446349b',
    'runtimeId': '56832234bec86b30201dbdc94-11149226',
    'lastStatus': 'RUNNING',
    'healthStatus': 'UNKNOWN',
    'cpu': '512',
    'memory': '1024'
}
mcd.add_vertex(node_id=arn, node_name='docker', node_type='docker', metadata=metadata)

drawio docker vertex:

<mxCell id="vertex:docker:arn:aws:ecs:eu-west-1:123456789012:container/cluster/777/123" parent="1" vertex="1">
    <mxGeometry width="50" height="41" as="geometry"/>
</mxCell>

Advanced for Geeks:

Style:

style="sketch=0;aspect=fixed;html=1;points=[];align=left;image;fontSize=12;image=img/lib/mscae/Docker.svg;labelBackgroundColor=none;"
attributevalue
alignleft
aspectfixed
fontSize12
html1
image 
imageimg/lib/mscae/Docker.svg
labelBackgroundColornone
points[]
sketch0

Vertex size:

attributevalue
width50
height41

Full XML dump:

<mxfile host="multicloud-diagrams" agent="PIP package multicloud-diagrams. Generate resources in draw.io compatible format for Cloud infrastructure. Copyrights @ Roman Tsypuk 2023. MIT license." type="MultiCloud">
    <diagram id="diagram_1" name="AWS components">
        <mxGraphModel dx="1015" dy="661" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="1">
            <root>
                <mxCell id="0"/>
                <mxCell id="1" parent="0"/>
                <mxCell id="vertex:docker:arn:aws:ecs:eu-west-1:123456789012:container/cluster/777/123" value="&lt;b&gt;Name&lt;/b&gt;: docker&lt;BR&gt;&lt;b&gt;ID&lt;/b&gt;: arn:aws:ecs:eu-west-1:123456789012:container/cluster/777/123&lt;BR&gt;-----------&lt;BR&gt;&lt;b&gt;name&lt;/b&gt;: my-app&lt;BR&gt;&lt;b&gt;image&lt;/b&gt;: 123456789012.dkr.ecr.eu-west-1.amazonaws.com/cluster/myapp:v2-22-00&lt;BR&gt;&lt;b&gt;imageDigest&lt;/b&gt;: sha256:5562sfsf60a6d1aaed5c2bb227d3d4ec14c755bdb446349b&lt;BR&gt;&lt;b&gt;runtimeId&lt;/b&gt;: 56832234bec86b30201dbdc94-11149226&lt;BR&gt;&lt;b&gt;lastStatus&lt;/b&gt;: RUNNING&lt;BR&gt;&lt;b&gt;healthStatus&lt;/b&gt;: UNKNOWN&lt;BR&gt;&lt;b&gt;cpu&lt;/b&gt;: 512&lt;BR&gt;&lt;b&gt;memory&lt;/b&gt;: 1024" style="sketch=0;aspect=fixed;html=1;points=[];align=left;image;fontSize=12;image=img/lib/mscae/Docker.svg;labelBackgroundColor=none;" parent="1" vertex="1">
                    <mxGeometry width="50" height="41" as="geometry"/>
                </mxCell>
            </root>
        </mxGraphModel>
    </diagram>
</mxfile>

drawio file:

Download generated docker.drawio:

Download