Created: 2024-01-07 | Updated: 2024-09-21
Docker container
New (v0.3.19)
Table of contents
Node Type: docker
Rendering:
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;"
attribute | value |
---|---|
align | left |
aspect | fixed |
fontSize | 12 |
html | 1 |
image | |
image | img/lib/mscae/Docker.svg |
labelBackgroundColor | none |
points | [] |
sketch | 0 |
Vertex size:
attribute | value |
---|---|
width | 50 |
height | 41 |
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="<b>Name</b>: docker<BR><b>ID</b>: arn:aws:ecs:eu-west-1:123456789012:container/cluster/777/123<BR>-----------<BR><b>name</b>: my-app<BR><b>image</b>: 123456789012.dkr.ecr.eu-west-1.amazonaws.com/cluster/myapp:v2-22-00<BR><b>imageDigest</b>: sha256:5562sfsf60a6d1aaed5c2bb227d3d4ec14c755bdb446349b<BR><b>runtimeId</b>: 56832234bec86b30201dbdc94-11149226<BR><b>lastStatus</b>: RUNNING<BR><b>healthStatus</b>: UNKNOWN<BR><b>cpu</b>: 512<BR><b>memory</b>: 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
: