Skip to content

Commit

Permalink
Added destroy container cell
Browse files Browse the repository at this point in the history
  • Loading branch information
Soufiane Jounaid committed May 1, 2024
1 parent 7ac41cb commit ac981b4
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion SSH_on_chiedge_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
"\n",
"try:\n",
" my_container = container.create_container(\n",
" container_name, \n",
" container_name,\n",
" image=\"ghcr.io/chameleoncloud/edge_ssh_image:latest\",\n",
" workdir=\"/home\",\n",
" exposed_ports=[22],\n",
Expand Down Expand Up @@ -248,6 +248,26 @@
"\n",
"print(\"use the following command to ssh into the container: ssh root@\" + ip_address)"
]
},
{
"cell_type": "markdown",
"id": "8289f941",
"metadata": {},
"source": [
"## Destroying the container\n",
"\n",
"Destroying the container after use is good practice to keep your device running smoothly, use when needed."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a3d3c0ba",
"metadata": {},
"outputs": [],
"source": [
"chi.container.destroy_container(my_container.uuid)"
]
}
],
"metadata": {
Expand Down

0 comments on commit ac981b4

Please sign in to comment.